Opened 17 years ago

Closed 17 years ago

#4959 closed (invalid)

Template for loop docs suggest missing tuple unpacking feature

Reported by: anonymous Owned by: Adrian Holovaty
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: no UI/UX: no

Description

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

Docs suggesting the missing feature: http://www.djangoproject.com/documentation/templates/#for

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 by anonymous, 17 years ago

Resolution: invalid
Status: newclosed

comment:2 by anonymous, 17 years ago

Resolution: invalid
Status: closedreopened

comment:3 by John Shaffer <jshaffer2112@…>, 17 years ago

Resolution: invalid
Status: reopenedclosed
Version: SVN

If you're using Django 0.96, then use the 0.96 docs: http://www.djangoproject.com/documentation/0.96/templates/

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