MySQL data types vs Django/Python data types


Gary Roach

Hi all,

Debian Wheezy Linux
Python 2.7
Django 1.5
MySql 5.5

I am new to Python and Django and am having trouble matching Python data
types with those of MySQL. MySQL has about 7 basic data types including
Blobs, Binaries, etc. It also has a rich selection of geometry types. In
addition, types like INT have 7 or 8 different options like Primary Key,
zero fill, auto inc, etc. I can't seem to find anything in python to
match these. I am trying to build a for an existing database
that was created with MySQL Workbench.

I do not wish to use anything other than MySQL because of the complexity
of my storage needs (searchable text, PDF, Audio, Video and Photos). The
text searches will often be word phrase searches through thousands of
documents. I need the speed and the data type flexibility.

How do I build or modify a to do this. I really don't want to
write a manually. That would really be a major pain. Workbench
to the database an import to Django and edit is my choice.
Unfortunately, the produced has lost most of the functionality
of the original database and I can't seem to figure out how to fix it.

Any help will be sincerely appreciated.

Gary R.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question