0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Tim Graham
9023696613 Removed dictionary and context_instance parameters for render functions.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham
b3641512c8 Removed dirs parameter in template engine methods and related funtions.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham
5e450c52aa Removed current_app argument to render() and TemplateResponse().
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Aymeric Augustin
2133f3157e Fixed #24168 -- Allowed selecting a template engine in a few APIs.
Specifically in rendering shortcuts, template responses, and class-based
views that return template responses.

Also added a test for render_to_response(status=...) which was missing
from fdbfc980.

Thanks Tim and Carl for the review.
2015-02-03 08:29:45 +01:00
Aymeric Augustin
127f9e073d Restored support for multiple template names in render(_to_response).
This possibility was documented but not tested.

It had been broken during the multiple template engines refactor.
2015-01-07 21:54:22 +01:00
Berker Peksag
da2a35cf9e Silenced a flake8 warning.
../tests/shortcuts/views.py:45:1: E302 expected 2 blank lines, found 1
2014-11-22 21:39:06 +02:00
Aymeric Augustin
7331788300 Avoided rewrapping Contexts in render_to_response.
This change preserves backwards-compatibility for a very common misuse
of render_to_response which even occurred in the official documentation.

It fixes that misuse wherever it happened in the code base and docs.

Context.__init__ is documented as accepting a dict and nothing else.
Since Context is dict-like, Context(Context({})) could work to some
extent. However, things get complicated with RequestContext and that
gets in the way of refactoring the template engine. This is the real
rationale for this change.
2014-11-22 17:58:38 +01:00
Aymeric Augustin
bf1bd0fbc9 Moved tests for render shortcuts to their own app. 2014-11-22 17:52:43 +01:00