#28002: named cycle tags don't work if cycle is instantiated outside included
template
---------------------------------+--------------------------------------
Reporter: kapil garg | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by Tim Graham):
Is the use case solved using the `silent` option? e.g.
{{{ #!python
from django.template.engine import Engine
engine = Engine(loaders=[
('django.template.loaders.locmem.Loader', {
'template': '{% for x in vars %}{% cycle "a" "b" "c" as cycler
silent %}{% include "include" %}{% endfor %}',
'include': '{{ cycler }}',
}),
])
output = engine.render_to_string('template', dict(vars=range(10)))
}}}
The output is 'abcabcabca'.
--
Ticket URL: <https://code.djangoproject.com/ticket/28002#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.d895b945cb1cfd3a27abc3f742e2082c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.