Not really sure what to use as subject here, or whether this qualifies
to be called a bug, but I don't think it belongs on django-users due to
being an issue in Django itself so I figured I'd ask here before opening
a ticket.

So, we have a project that doesn't use contrib.auth, and it doesn't use
contrib.admin, it does, however, use contrib.contenttypes.generic. And
c.c.generic imports InlineModelAdmin and flatten_fieldsets from
contrib.admin.options, which does some more imports which down the line
causes various models to be imported from contrib.auth.models, and this
in turn causes the auth models to be registered in AppCache, and thus to
be found by db.models.Options' get_all_related_objects() which is used
by db.models.deletion.Collector.collect().

This hasn't caused us any trouble so far, but now that we needed to
delete some stale ContentTypes we suddenly got weird crashes related to
contrib.auth tables not existing when delete() tried to find foreign
keys pointing to ContentType. 

I've tested moving the admin related bits from contenttypes/generic.py
to contenttypes/admin.py, which seems to have fixed our immediate
problem, but haven't really tested if it breaks anything else. And I
guess this could be considered a too obscure corner case to care about,
but would appreciate some feedback anyway. 


-- 
Jens Ådne Rydland

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to