Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#29617 closed Bug (fixed)

django.template.Template crashes if the template_string argument is lazy

Reported by: Dražen Odobašić Owned by: Dražen Odobašić
Component: Template system Version: 2.0
Severity: Release blocker Keywords:
Cc: 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

  • proposed solution: use str to force evaluation of lazy objects

Change History (5)

comment:1 by Tim Graham, 6 years ago

Has patch: set
Severity: NormalRelease blocker
Summary: Regression - lazy strings are raising TypeError in template Lexerdjango.template.Template crashes if the template_string argument is lazy
Triage Stage: UnreviewedReady for checkin
Version: master2.0

comment:2 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 9f3b9ff:

Fixed #29617 -- Fixed Template crash if template_string is lazy.

Regression in 3a148f958dddd97c1379081118c30fbede6b6bc4.

comment:3 by Tim Graham <timograham@…>, 6 years ago

In 4dadf4e:

[2.1.x] Fixed #29617 -- Fixed Template crash if template_string is lazy.

Regression in 3a148f958dddd97c1379081118c30fbede6b6bc4.
Backport of 9f3b9ffd51c71d96728df9ee16f5a57c6f3b315d from master

comment:4 by Tim Graham <timograham@…>, 6 years ago

In 253f1b74:

[2.0.x] Fixed #29617 -- Fixed Template crash if template_string is lazy.

Regression in 3a148f958dddd97c1379081118c30fbede6b6bc4.
Backport of 9f3b9ffd51c71d96728df9ee16f5a57c6f3b315d from master.

comment:5 by Daniel Miller, 4 years ago

It appears that as of this change it is no longer possible to use Template with bytes since the input is now coerced to str. CommCareHQ was using that feature and ran into the issue while upgrading Django. I did not see mention of this backward-incompatible change in the release notes.

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