Commit Graph

11 Commits

Author SHA1 Message Date
django-bot 9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Tim Graham 573ec714e5 Refs #25978 -- Removed shortcuts.render_to_response() per deprecation timeline. 2019-01-17 10:50:25 -05:00
Tim Graham 043bd70942 Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
Alasdair Nicol 3380169222 Removed unused view and url from shortcuts tests.
The test that used these was removed in 9114fe8ada.
2016-04-12 07:54:34 -04:00
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
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
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