Fixed #15008 -- Replaced all calls in the admin to render_to_response with TemplateResponses for easier customization. Thanks to Chris Adams for the initial patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-04-22 18:17:16 +00:00
parent 13cfdb0d8b
commit c8092b840b
7 changed files with 97 additions and 67 deletions

View file

@ -1064,6 +1064,13 @@ provided some extra mapping data that would not otherwise be available::
return super(MyModelAdmin, self).change_view(request, object_id,
extra_context=my_context)
.. versionadded:: 1.4
These views now return :class:`~django.template.response.TemplateResponse`
instances which allow you to easily customize the response data before
rendering. For more details, see the
:doc:`TemplateResponse documentation </ref/template-response>`.
``ModelAdmin`` media definitions
--------------------------------