syncdb should cleanup tables?!?!

2 Aufrufe
Direkt zur ersten ungelesenen Nachricht

jedie

ungelesen,
10.05.2007, 04:54:1510.05.07
an Django developers
I have Problems with old entries in "django_content_type". I described
it here: http://groups.google.com/group/django-users/browse_thread/thread/4f74fc5a98f7c8fe/1b542eff91614ab8
I get the error "ContentType matching query does not exist." if i
create a new user group.

The Problem is: I had content types in my db without the corresponding
model class.
This happens, when you remove applications from your project or if you
delete some model class in your app.
There is a more detailed description in the german python-forum:
http://www.python-forum.de/topic-10510.html

I've hacked a standalone script to delete old entries in the tables
"django_content_type" and "django_content_type": http://paste.pocoo.org/show/1482/
This it not enough. Other tables must be still updated:
"auth_user_user_permissions", "auth_group_permissions", etc.

Should that not do syncdb? Perhaps with an additional parameter, e.g.:
"django-admin.py syncdb --cleanup=true"

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten