Removing ‘Sites’ from Django admin page

djangodjango-admin

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?

Best Answer

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