Unified AdminSite imports in docs.

This commit is contained in:
Hasan Ramezani 2022-05-25 13:13:28 +02:00 committed by GitHub
parent 8cf4de206c
commit ce69e34bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2979,11 +2979,11 @@ to reference your :class:`AdminSite` subclass.
.. code-block:: python .. code-block:: python
:caption: myapp/admin.py :caption: myapp/admin.py
from django.contrib.admin import AdminSite from django.contrib import admin
from .models import MyModel from .models import MyModel
class MyAdminSite(AdminSite): class MyAdminSite(admin.AdminSite):
site_header = 'Monty Python administration' site_header = 'Monty Python administration'
admin_site = MyAdminSite(name='myadmin') admin_site = MyAdminSite(name='myadmin')