Changes between Initial Version and Version 1 of Ticket #6271


Ignore:
Timestamp:
Dec 31, 2007, 2:51:20 AM (17 years ago)
Author:
Gary Wilson
Comment:

The bigger problem here is that many of the template tags do not accept filtered arguments passed an argument with a space because they are simply doing token.contents.split().

Here is a patch that seems to fix things for regroup, ifchanged, and with. firstof, if, and ifequal/ifnotequal need some more (involved) work. I changed smart_split_re to allow text before and after the quote characters. Not sure if we want smart_split() to basically only be for parsing template tags, but it seems to be the only place it's used currently.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6271

    • Property Has patch set
    • Property Patch needs improvement set
    • Property Triage Stage UnreviewedAccepted
    • Property Summary Changeset 6956 broke regroup tag if filter contains a spacefilter arguments with spaces break several template tags
  • Ticket #6271 – Description

    initial v1  
    1 After 6956, something like this now breaks:
     1After [6956], something like this now breaks:
    22{{{
    3         {% regroup object_list by created|date:"F Y" as grouped %}
     3{% regroup object_list by created|date:"F Y" as grouped %}
    44}}}
    55I believe it now splits the quoted bits and the arg count is more than 6 in this case, so the templatetag errors out.
Back to Top