I've just inherited a Django project for maintenance and continuous development. While I'm a fairly proficient programmer (also Python) I have next to no experience with Django, therefore I need a bit of saneness-checking for my ideas ;)
The current problem is this: the project contains a custom install.sh
file, which does three things:
- Creating some non-model databases and importing initial data via SQL
- Importing fixtures using
manage.py
- The usual
migrate.py syncdb
andmigrate.py migrate
.
(install.sh
also contained some logic to implement half-baked south
dependency management, which I replaced by a native one)
My idea was the following:
- Generate models for every non-model database table (
manage.py inspectdb
for a start, split up in apps afterwards). - Convert all non-
south
models tosouth
- Convert initial SQL data to
south
fixtures - Convert database backup routines to
manage.py dumpdata
(and restoring tomanage.py loaddata
fixtures). - Never work with raw SQL again
Now the simple question is: is this plan sensible? What are the alternatives?