So i received errors like: "ContentType matching query does not exist."
(When i create a new user group).
Is there a way to update the django tables automatically?
--
Mfg.
Jens Diemer
----
A django powered CMS: http://www.pylucid.org
How to clean up the django tables? With phpMyAdmin?
http://paste.pocoo.org/show/1482/
btw. you should have the same problem, if you test a separate django
app. And "deinstall" it later.
If you use "django.contrib.auth" and "django.contrib.contenttypes" there
must be exist obsolete contenttypes and permission entries, after you
deactivate the test-App.
I've just run into a similar issue when I removed an app from a
project. After some attempt to fix the tables myself, I held my
breath, dropped the tables (auth_permission and django_content_type),
then ran "python manage.py syncdb". Voila, the tables were re-created
correctly, without the app I had removed.
Yes, you can drop and recreate the tables.
But if you setup users and permissions, then IMHO you lost this :(
For PyLucid i have made a small tool to fix this:
http://pylucid.net/trac/browser/branches/0.8%28django%29/PyLucid/tools/clean_tables.py?rev=1085