#9717: manage.py flush raises error if there are unsynchronized applications
--------------------------------------+-------------------------------------
Reporter: russellm | Owner: nobody
Status: new | Milestone:
Component: django-admin.py | Version: 1.0
Resolution: | Keywords:
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Comment (by julien):
The proposed patch is a bit simpler than replicating `syncdb`'s behaviour.
It works when tested locally with my apps, but unfortunately I could not
find a way to write regression tests for it. Here's a first sketch below:
{{{
>>> _old_installed_apps = settings.INSTALLED_APPS
>>> settings.INSTALLED_APPS += ['?????']
>>> management.call_command('flush', verbosity=0, interactive=False)
>>> settings.INSTALLED_APPS = _old_installed_apps
}}}
The problem is: what should we put in place of the "?????". All contrib
apps with models are included by default in the test suite, so we can't
play with those. So, I guess that to properly test this, one would need to
be able to include apps dynamically in the test suite, a problem which
#7835 is trying to solve. Looks like a "chicken or the egg" puzzle :)
Any suggestion?
--
Ticket URL: <http://code.djangoproject.com/ticket/9717#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---