Opened 9 years ago

Closed 9 years ago

#4959 closed (invalid)

Template for loop docs suggest missing tuple unpacking feature

Reported by: anonymous Owned by: adrian
Component: Template system Version:
Severity: Keywords: for template parsing tuple dictionary
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The docs suggest you can unpack tuples in templates, however, this does not work.

Docs suggesting the missing feature:

When attempted, this is the exception thrown:

bits = token.contents.split()
if len(bits) == 5 and bits[4] != 'reversed':
   raise TemplateSyntaxError, "'for' statements with five words should end in 'reversed': %s" % token.contents

Change History (3)

comment:1 Changed 9 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

comment:2 Changed 9 years ago by anonymous

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:3 Changed 9 years ago by John Shaffer <jshaffer2112@…>

  • Resolution set to invalid
  • Status changed from reopened to closed
  • Version SVN deleted

If you're using Django 0.96, then use the 0.96 docs:

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