On 8/14/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > I would suggest that rather than trying to make the --with-fixture > flag handle all this, it would be better to do this as a top level > command, i.e.: > > django-admin.py testserver mydata.json accounts.json categories.json > > This would also draw attention to the fact that the database that will > be used for the server and the data in that database are a testing > facility, not the main server and main database.
This makes sense -- I hadn't considered the possibility of multiple fixtures. I'm sold on the idea of a separate command. > > * Delete the test database when the development server is stopped. > > As noted by others, I don't think this is wise. Todd's suggestion of > clearing the database at the start of execution strikes me as a better > approach. Agreed. I *do* think it's slightly messy to leave a database on the person's machine, but I'll make it so that Django outputs a message -- something like "Test database 'django_test_db' still exists on your system; feel free to poke around, or delete it" -- when the server is stopped. > > In the future, the next step would be to keep track of any database > > changes and optionally serialize them back into the fixture when the > > server is stopped. > > Cool, yes - but but also very difficult. Again, multiple fixtures are > the problem here. Ah, multiple fixtures are a cruel mistress. Maybe we only enable this feature if you're using a single fixture. If you're using multiple fixtures, this feature wouldn't be available. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
