mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27313 -- Allowed overriding admin popup response template.
This commit is contained in:
committed by
Tim Graham
parent
fb1349ce8c
commit
1e629928e9
@@ -1318,6 +1318,12 @@ templates used by the :class:`ModelAdmin` views:
|
||||
|
||||
Path to a custom template, used by :meth:`history_view`.
|
||||
|
||||
.. attribute:: ModelAdmin.popup_response_template
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Path to a custom template, used by :meth:`response_add`,
|
||||
:meth:`response_change`, and :meth:`response_delete`.
|
||||
|
||||
.. _model-admin-methods:
|
||||
|
||||
@@ -2516,6 +2522,11 @@ app or per model. The following can:
|
||||
* ``change_list.html``
|
||||
* ``delete_confirmation.html``
|
||||
* ``object_history.html``
|
||||
* ``popup_response.html``
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ability to override the ``popup_response.html`` template was added.
|
||||
|
||||
For those templates that cannot be overridden in this way, you may still
|
||||
override them for your entire project. Just place the new version in your
|
||||
|
||||
@@ -72,6 +72,10 @@ Minor features
|
||||
<django.contrib.admin.ModelAdmin.get_exclude>` hook allows specifying the
|
||||
exclude fields based on the request or model instance.
|
||||
|
||||
* The ``popup_response.html`` template can now be overridden per app, per
|
||||
model, or by setting the :attr:`.ModelAdmin.popup_response_template`
|
||||
attribute.
|
||||
|
||||
:mod:`django.contrib.admindocs`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user