#23833: drop all tables
-------------------------------------+-------------------------------------
Reporter: MattBlack85 | Owner:
Type: New feature | MattBlack85
Component: Core (Management | Status: assigned
commands) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by burhan):
Faced with a similar problem, I came up with this snippet that will clear
only those apps that are not `django.contrib.` (of course, this is before
migrations came around). Might give some ideas:
{{{
echo 'from django.conf import settings; print settings.INSTALLED_APPS;
quit();' | \
python manage.py shell --plain 2>&1 | \
tail -n1 | sed -r "s|^.*\((.*)\).*$|\1|; s|[',]| |g;
s|django\.contrib\.||g" | \
xargs python manage.py sqlclear | \
python manage.py dbshell && python manage.py syncdb
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23833#comment:7>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.71ad2edb86eb027bf40a8578e622d65f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.