Django: Proper place to unregister ModelAdmins
Posted
by lazerscience
on Stack Overflow
See other posts from Stack Overflow
or by lazerscience
Published on 2010-06-15T20:52:49Z
Indexed on
2010/06/15
21:12 UTC
Read the original article
Hit count: 221
django
|django-admin
Sometimes I need to UNREGISTER some ModelAdmins from the admin site, because I don't want them to be there as they are, eg. if I'm using the Sites framework, and I dont want it to appear in the admin. It's no big deal to e.g. call admin.site.unregister(Site)
to do so. In most cases I put it in admin.py
of some related app that I have made, but sometimes I end up putting it in a place that hasn't much to do with the original app; another possibility would be making a "dummy app" and put it there...
Does anybody know a more descent place where these calls can live?
© Stack Overflow or respective owner