Improved assignment_tag

48 views
Skip to first unread message

Choongmin Lee

unread,
Apr 19, 2012, 11:21:45 AM4/19/12
to django-d...@googlegroups.com
Is it only me who needs a simple tag with optional assignment, e.g. that both {% mytag %} and {% mytag as varname %} are possible?

Attached is a patch that make the assignment optional for assignment_tag.

If this change of behavior of assignment_tag is not acceptable, then how about adding a new decorator like 'optional_assignment_tag', or adding a new parameter to assignment_tag?
improved_assignment_tag.diff

Anssi Kääriäinen

unread,
Apr 20, 2012, 11:10:26 AM4/20/12
to Django developers
Please clarify more why and how this should be used, as I don't get
the use-case.

BTW patches aren't usually attached to django-developers posts, we use
Trac for that (https://code.djangoproject.com/).

- Anssi
Reply all
Reply to author
Forward
0 new messages