[4.1.x] Unified AdminSite imports in docs.
Backport of ce69e34bd6
from main
This commit is contained in:
parent
3d4bab28de
commit
44e754fc83
|
@ -2995,11 +2995,11 @@ to reference your :class:`AdminSite` subclass.
|
|||
.. code-block:: python
|
||||
:caption: myapp/admin.py
|
||||
|
||||
from django.contrib.admin import AdminSite
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import MyModel
|
||||
|
||||
class MyAdminSite(AdminSite):
|
||||
class MyAdminSite(admin.AdminSite):
|
||||
site_header = 'Monty Python administration'
|
||||
|
||||
admin_site = MyAdminSite(name='myadmin')
|
||||
|
|
Loading…
Reference in New Issue