#6378: Capture arbitrary output as a template variable
---------------------------------------------+------------------------------
Reporter: kcarnold | Owner: nobody
Status: new | Milestone:
Component: Template system | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by ericholscher):
I wrote up a patch with this code in it. It has tests, but the test:
{{{
'with04': ('{{ content }}-{% with dict.key as key into content
%}{{ key }}{% endwith %}-{{ content }}', {'dict': {'key': 50}}, '--50'),
}}}
Is failing only when
{{{
Template test (TEMPLATE_STRING_IF_INVALID='INVALID'): with04 -- FAILED.
Expected '--50', got u'50--50'
}}}
When the TEMPLATE_STRING_IF_INVALID="", it works fine and only inserts
into the context afterwards. When it is set to INVALID, it appears to
break. I don't really understand this but will investigate further.
--
Ticket URL: <http://code.djangoproject.com/ticket/6378#comment:5>
Django <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
-~----------~----~----~----~------~----~------~--~---