mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #32031 -- Added model class for each model to AdminSite.each_context().
This commit is contained in:
parent
0456d3e427
commit
3733ae8957
4 changed files with 13 additions and 1 deletions
|
@ -3025,6 +3025,7 @@ Templates can override or extend base admin templates as described in
|
|||
|
||||
Each model is a dict with the following keys:
|
||||
|
||||
* ``model``: the model class
|
||||
* ``object_name``: class name of the model
|
||||
* ``name``: plural name of the model
|
||||
* ``perms``: a ``dict`` tracking ``add``, ``change``, ``delete``, and
|
||||
|
@ -3032,6 +3033,10 @@ Templates can override or extend base admin templates as described in
|
|||
* ``admin_url``: admin changelist URL for the model
|
||||
* ``add_url``: admin URL to add a new model instance
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``model`` variable for each model was added.
|
||||
|
||||
.. method:: AdminSite.has_permission(request)
|
||||
|
||||
Returns ``True`` if the user for the given ``HttpRequest`` has permission
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue