#5177: ContentType should purge orphaned models
---------------------------------------------------+------------------------
Reporter: Rob Hudson <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component:
Contrib apps
Version: SVN | Resolution:
Keywords: | Stage:
Unreviewed
Has_patch: 1 | Needs_docs: 1
Needs_tests: 0 | Needs_better_patch: 0
---------------------------------------------------+------------------------
Changes (by Rob Hudson <[EMAIL PROTECTED]>):
* needs_docs: 0 => 1
Comment:
Just an update on this patch: I figured out the "trickery" in that
Permissions has a FK to ContentType and therefore takes care of itself
when a content type is deleted. Nice.
This patch accomplishes what I think it should...
* If a model in an installed app gets orphaned, it removes that content
type.
* If a content type is renamed, it removes the old one and installs the
new one.
* It does not track or understand a renaming happened and migrate
permissions or anything else. That's a bit outside the scope of this, I
think.
I'll work on adding docs and test cases if I can.
-Rob
--
Ticket URL: <http://code.djangoproject.com/ticket/5177#comment:2>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---