mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[2.0.x] Fixed #28777 -- Clarified the docs for admin.register's args.
Backport of abaf0ab4a444977dc8ac07b9b63256814c352245 from master
This commit is contained in:
parent
36dd0126a5
commit
3c8c3ff637
@ -123,9 +123,9 @@ The ``register`` decorator
|
|||||||
class AuthorAdmin(admin.ModelAdmin):
|
class AuthorAdmin(admin.ModelAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
It is given one or more model classes to register with the ``ModelAdmin``
|
It's given one or more model classes to register with the ``ModelAdmin``.
|
||||||
and an optional keyword argument ``site`` if you are not using the default
|
If you're using a custom :class:`AdminSite`, pass it using the ``site`` keyword
|
||||||
``AdminSite``::
|
argument::
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import Author, Reader, Editor
|
from .models import Author, Reader, Editor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user