Opened 9 years ago

Closed 9 years ago

#4098 closed (fixed)

{% with %} tag references unknown global, tagname

Reported by: cephelo@… Owned by: adrian
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


There's a small error in the default {% with ... %} tag, it references an unknown variable, 'tagname', when used with invalid syntax. [source:/django/trunk/django/template/] Line 1002, should be:

bits = token.split_contents()
if len(bits) != 4 or bits[2] != "as":
    raise TemplateSyntaxError, "%r expected format is 'value as name'" % bits[0]

Also note that there is a superfluous list() call around token.split_contents().

Change History (1)

comment:1 Changed 9 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [5048]) Fixed #4098 -- fixed a syntax error when reporting errors in "with" template
tag. Thanks cephelo@….

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