I've just finished django-izing a big geo-database (I never ever again want to hunt for a list of states or countries), and it was terribly easy. manage.py inspectdb is quite the time-saver.

Building the database is non-trivial however, and the SQL for building the schema was some clever constraints that I doubt django will re-create if I build the schema from the model. I was thinking it'd be elegant to detect if the database exists before the models are referenced, and create it from SQL data if it doesn't. Right now if I ever move the app to another server I have a few ugly manual steps piping SQL into the db... this won't work for production.

I'm a little fuzzy on django's execution order, though. What would be the safest place to do this? Initialization code in the model module seems like the most obvious choice, but I'm a bit uncomfortable being in the dark as to how django initializes within mod_python. Where's the best spot for app initialization and teardown code?

Tia,
~ol


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to