Category Archives: Database

mysql for python 2.6

if you want to use mysql with python, apart from standard installations, you also need a small integrator called mysql for python. Its a python based module to make sure that all communications with mysql from python code to look and behave similar rest of python style apis.

if you are on windows with python 2.5, you can get it from following link
mysql for python

However, for python 2.6, above installation is not working. follow below link
mysql for python 2.6


DJango fixtures

One of the important feature from DJango is fixture generation and consumption.

Fixture is nothing but searialized data in file with proper file naming. Well, it by default recognizes some serialization formats. ex: xml, json etc. Usally file names goes like this: MyFixture.json.

DJango tries to learn data format from file extension.
Generating fixtures from DJango is pretty easy dumpdata

Above command results serialized data of all models of your all apps under project. Ofcourse, there are couple of options to fine tune your command to exclude some apps, to mention format of serialization etc. help dumpdata

issue above command to get full details of available options from your DJango project path.