Re: delete obsolete content type entries...

2013-03-25 Thread chris
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

Re: delete obsolete content type entries...

2013-02-10 Thread vijay shanker
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 >

Re: delete obsolete content type entries...

2007-06-19 Thread Jens Diemer
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

Re: delete obsolete content type entries...

2007-06-18 Thread Gabriel Farrell
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

Re: delete obsolete content type entries...

2007-05-08 Thread Jens Diemer
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

Re: delete obsolete content type entries...

2007-05-07 Thread Jens Diemer
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

delete obsolete content type entries...

2007-05-04 Thread Jens Diemer
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