#5971: django.template.TokenParser inconsistent with parsing filters
----------------------------------------------------+-----------------------
Reporter: Dmitri Fedortchenko <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Template
system
Version: SVN | Keywords: template
filter
Stage: Unreviewed | Has_patch: 1
----------------------------------------------------+-----------------------
django.template.TokenParser is inconsistent
when parsing filters that follow constant strings or variables.
Meaning that:
{% tag thevar|filter sometag %} will produce:
self.value() = "thevar|filter"
self.tag() = "sometag"
However:
{% tag "a value"|filter sometag %} will produce:
self.value() = "a value"
self.tag() = "|filter"
self.tag() = "sometag"
This does not seem like correct behaviour...
I made a very simple patch for this, thus the outcome of the above:
{% tag "a value"|filter sometag %} will produce:
value = "a value"|filter
tag = sometag
So now we can simply pass the "value" into a FilterExpression to parse
the filters...
PS: I had trouble naming an internal method, feel free to complain about
the name ;)
--
Ticket URL: <http://code.djangoproject.com/ticket/5971>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---