It seems that stale content types return `None` for
`ContentTpye.model_class()` , so the following deletes all stale content
types. I would back up and test this extensively first though because
deleting content type you don't want to is dangerous.
for c in ContentType.objects.all():
if not
we can delete all obsolete ContentType entries manually.
>>>for each in ContentType.objects.filter(app_label=appname): each.delete()
thanks
On Friday, May 4, 2007 8:42:51 PM UTC+5:30, Jens Diemer wrote:
>
>
> I have delete some app models. So, in the internal django tables
>
Gabriel Farrell schrieb:
> On May 7, 4:32 am, Jens Diemer <[EMAIL PROTECTED]> wrote:
>> That surprises me. Does nobody have the same problems?
>> Still nobody delete a model class?
>>
>> How to clean up the django tables? With phpMyAdmin?
>>
>
> I've just run into a similar issue when I removed
On May 7, 4:32 am, Jens Diemer <[EMAIL PROTECTED]> wrote:
> That surprises me. Does nobody have the same problems?
> Still nobody delete a model class?
>
> How to clean up the django tables? With phpMyAdmin?
>
I've just run into a similar issue when I removed an app from a
project. After some
Here a stand alone cleanup script, for discussion:
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
That surprises me. Does nobody have the same problems?
Still nobody delete a model class?
How to clean up the django tables? With phpMyAdmin?
--
Mfg.
Jens Diemer
A django powered CMS: http://www.pylucid.org
--~--~-~--~~~---~--~~
You received this
I have delete some app models. So, in the internal django tables
"django_content_type" and "auth_permission" are some old content types
entries.
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
7 matches
Mail list logo