diff options
| author | Raffaele Salmaso <raffaele@salmaso.org> | 2020-09-22 10:46:27 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-05-13 06:57:09 +0200 |
| commit | 3733ae895780f17430924f1e20ee320556c62d05 (patch) | |
| tree | cf4757b5e6ce5b5fda0ebad586cc35a69c5e9446 /docs | |
| parent | 0456d3e42795481a186db05719300691fe2a1029 (diff) | |
Fixed #32031 -- Added model class for each model to AdminSite.each_context().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 5 | ||||
| -rw-r--r-- | docs/releases/4.0.txt | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 8da7a72f10..2e99c498e9 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -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 diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index fdd4b6c39b..3168200070 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -72,6 +72,9 @@ Minor features * The navigation sidebar now has a quick filter toolbar. +* The new context variable ``model`` which contains the model class for each + model is added to the :meth:`.AdminSite.each_context` method. + :mod:`django.contrib.admindocs` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
