diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-01-26 21:57:10 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-03 08:29:45 +0100 |
| commit | 2133f3157eff853329bafb7fda74c3c8fb4eae42 (patch) | |
| tree | 5bb262ab847c79b3f70d8a8888e267b2816b0373 /django/views | |
| parent | a53541852d5601232899e54d66e623bc163c6dc2 (diff) | |
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.
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/generic/base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/views/generic/base.py b/django/views/generic/base.py index a873f11f05..88b6608fd2 100644 --- a/django/views/generic/base.py +++ b/django/views/generic/base.py @@ -114,6 +114,7 @@ class TemplateResponseMixin(object): A mixin that can be used to render a template. """ template_name = None + template_engine = None response_class = TemplateResponse content_type = None @@ -130,6 +131,7 @@ class TemplateResponseMixin(object): request=self.request, template=self.get_template_names(), context=context, + using=self.template_engine, **response_kwargs ) |
