#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           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 The following code does not work. I don't know if this is the desired
 behaviour or not.


 {{{
 def test_cycle():
         engine = Engine(loaders=[
             ('django.template.loaders.locmem.Loader', {
                 'template': '{% for x in vars %}{%cycle "a" "b" "c" as
 cycler%}{% include "include" %}{% endfor %}',
                 'include': '{% cycle cycler %}',
             }),
         ])
         output = engine.render_to_string('template', dict(vars=range(10)))
         print(output)
 }}}

 This is a pretty normal use case when cycle values are passed from another
 template.

--
Ticket URL: <https://code.djangoproject.com/ticket/28002>
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/056.5c4011e352c54d1e4567c766b958a837%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to