Django: Proper place to unregister ModelAdmins -
Sometimes I need to ignore some model admin from the admin site, because I do not want them to be there, like. If I'm using the sites framework, and I do not want to appear in the admin. To do this, call admin.site.unregister (site)
In most cases I have put it in the admin.py
of some related app But sometimes I put it on a place that does nothing with the original app; Another possibility is making a "dummy app" and it will be put there ... does anyone know more original location where these calls can live?
You can add it to urls.py
or anywhere < Code> admin.autodiscover () .
Comments
Post a Comment