From 3733ae895780f17430924f1e20ee320556c62d05 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Tue, 22 Sep 2020 10:46:27 +0200 Subject: Fixed #32031 -- Added model class for each model to AdminSite.each_context(). --- docs/ref/contrib/admin/index.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/ref') 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 -- cgit v1.3