Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#24168 closed Bug (fixed)

TemplateResponse and TemplateView cannot select a specific template engine

Reported by: Aymeric Augustin Owned by: nobody
Component: Template system Version: master
Severity: Normal Keywords: multiple-template-engines 1.8
Cc: Zach Borboa Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

TemplateResponse should gain an engine argument.

TemplateResponseMixin should gain an engine attribute.

Change History (8)

comment:1 Changed 4 years ago by Zach Borboa

Cc: Zach Borboa added

comment:2 Changed 4 years ago by Aymeric Augustin

Has patch: set
Needs tests: set
Triage Stage: UnreviewedAccepted

comment:3 Changed 4 years ago by Aymeric Augustin

Needs tests: unset

comment:4 Changed 4 years ago by Aymeric Augustin

While I was in the area, I added ShortcutTests.test_render_to_response_with_status which was missing from fdbfc98003f0ba2d3a12def63a75560791f3602d.

Last edited 4 years ago by Aymeric Augustin (previous) (diff)

comment:5 Changed 4 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:6 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: newclosed

In 2133f3157eff853329bafb7fda74c3c8fb4eae42:

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.

comment:7 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

In f87457a4604efc862381020b47f4e6fe8272ac0b:

[1.8.x] 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.

Backport of 2133f31 from master.

Conflicts:

docs/topics/http/shortcuts.txt
tests/generic_views/test_base.py

comment:8 Changed 4 years ago by Tim Graham <timograham@…>

In c65c8f5696eeac056260a0850525d5266dcf8353:

[1.8.x] Skipped tests from refs #24168 on Python 3.2.

Note: See TracTickets for help on using tickets.
Back to Top