Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.064 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'subject:Django': 0.03; 'subject:Python': 0.06; 'modify': 0.07; 'mysql.': 0.09; 'python': 0.11; 'django': 0.11; '2.7': 0.14; 'received:206.46': 0.16; 'received:206.46.173': 0.16; 'fix': 0.17; 'all,': 0.19; 'trying': 0.19; 'addition,': 0.20; 'import': 0.22; 'header:User-Agent:1': 0.23; 'text,': 0.24; 'options': 0.25; 'subject:/': 0.26; 'primary': 0.26; 'appreciated.': 0.29; 'matching': 0.30; 'gary': 0.31; 'searches': 0.31; 'types.': 0.31; 'this.': 0.32; 'figure': 0.32; 'selection': 0.32; 'text': 0.33; 'linux': 0.33; 'trouble': 0.34; 'basic': 0.35; "can't": 0.35; 'created': 0.35; 'really': 0.36; 'subject:data': 0.36; 'auto': 0.38; 'rich': 0.38; 'to:addr :python-list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'major': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'most': 0.60; 'lost': 0.61; 'new': 0.61; 'received:206': 0.63; 'sincerely': 0.63; 'different': 0.65; 'wish': 0.70; 'complexity': 0.84; 'fill,': 0.84; 'received:192.168.1.7': 0.84; 'system:': 0.91; 'these.': 0.91; 'choice.': 0.93; 'inc,': 0.93 Date: Sun, 01 Sep 2013 13:52:01 -0700 From: Gary Roach User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130828 Icedove/17.0.8 MIME-version: 1.0 To: python-list@python.org Subject: MySQL data types vs Django/Python data types Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378068747 news.xs4all.nl 15925 [2001:888:2000:d::a6]:52728 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53431 Hi all, System: 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 model.py 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 model.py to do this. I really don't want to write a model.py manually. That would really be a major pain. Workbench to the database an import to Django and edit is my choice. Unfortunately, the model.py 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.