Reputation: 3118
The Django admin page has 'Sites' as a default object.
This is confusing to users, as my application also has a 'Site' model accessible through the admin page.
How can I remove the default object from the page?
Upvotes: 21
Views: 11171
Reputation: 39287
use unregister
:
from django.contrib import admin
from django.contrib.sites.models import Site
admin.site.unregister(Site)
I usually put this after the:
admin.autodiscover()
in urls.py
Upvotes: 45
Reputation: 32622
Perhaps commenting out django.contrib.sites
from the INSTALLED_APPS
tuple in your settings.py file will help.
Upvotes: 7