Changes between Initial Version and Version 1 of Ticket #6271


Ignore:
Timestamp:
12/31/2007 02:51:20 AM (7 years ago)
Author:
gwilson
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 Patch needs improvement set
    • Property Needs tests unset
    • Property Summary changed from Changeset 6956 broke regroup tag if filter contains a space to filter arguments with spaces break several template tags
    • Property Needs documentation unset
    • Property Has patch set
    • Property Triage Stage changed from Unreviewed to Accepted
  • 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