admin.autodiscover()

autodiscover() [source] This function attempts to import an admin module in each installed application. Such modules are expected to register models with the admin. Typically you won’t need to call this function directly as AdminConfig calls it when Django starts. If you are using a custom AdminSite, it is common to import all of the ModelAdmin subclasses into your code and register them to the custom AdminSite. In that case, in order to disable auto-discovery, you should put 'django.contrib

admin.apps.AdminConfig

class apps.AdminConfig This is the default AppConfig class for the admin. It calls autodiscover() when Django starts.

admin.AdminSite.site_title

AdminSite.site_title The text to put at the end of each admin page’s <title> (a string). By default, this is “Django site admin”.

admin.AdminSite.site_url

AdminSite.site_url The URL for the “View site” link at the top of each admin page. By default, site_url is /. Set it to None to remove the link. For sites running on a subpath, the each_context() method checks if the current request has request.META['SCRIPT_NAME'] set and uses that value if site_url isn’t set to something other than /. Changed in Django 1.10: The SCRIPT_NAME support described in the previous paragraph was added.

admin.AdminSite.register()

AdminSite.register(model_or_iterable, admin_class=None, **options) [source] Registers the given model class (or iterable of classes) with the given admin_class. admin_class defaults to ModelAdmin (the default admin options). If keyword arguments are given – e.g. list_display – they’ll be applied as options to the admin class. Raises ImproperlyConfigured if a model is abstract. and django.contrib.admin.sites.AlreadyRegistered if a model is already registered.

admin.AdminSite.site_header

AdminSite.site_header The text to put at the top of each admin page, as an <h1> (a string). By default, this is “Django administration”.

admin.AdminSite.password_change_done_template

AdminSite.password_change_done_template Path to a custom template that will be used by the admin site password change done view.

admin.AdminSite.password_change_template

AdminSite.password_change_template Path to a custom template that will be used by the admin site password change view.

admin.AdminSite.logout_template

AdminSite.logout_template Path to a custom template that will be used by the admin site logout view.

admin.AdminSite.login_template

AdminSite.login_template Path to a custom template that will be used by the admin site login view.