On 10/2/07, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > > [snipped] > > First and before the feeding of the database, after creating my > > database in the mysql prompt by inserting SQL code could django > > analyse my clean database and create class for each table? > > with the right field type? > > Try using the inspectdb command. Refer to > http://www.djangoproject.com/documentation/legacy_databases/#auto-generate-the-models > for more details.
Fair warning in advance - while this approach should _mostly_ work, Django doesn't currently have any support for the MySQL Polygon types, so you may encounter some difficulties with that field. You may find it necessary to 'tweak' the models produced by inspectdb, and it will probably be necessary to define a custom Field type to represent the Polygon data. Queries on the polygon data will also be somewhat restricted. Since Django doesn't have support for a Polygon field, it doesn't contain any helpful query language specific to Polygons, either. However, if you're willing to drop to raw SQL occasionally, you should be able to use Django to manage the basic framework of the application you are describing. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---