#34468: `Cycle` tag do not work with variables defined in `with`-tag.
-------------------------------------+-------------------------------------
Reporter: Алексей Поклонский | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 4.0
Severity: Normal | Resolution: invalid
Keywords: cycle, with, | Triage Stage:
templates | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => invalid
Comment:
When a single argument is passed to the `{% cycle %}` it has to be a named
cycle because it doesn't make a lot of sense to cycle among the single
value.
`{% with %}` works properly with `{% cycle %}`, for example:
{{{
{% with example_defined_variable="123" %}
{% with example_defined_variable2="123" %}
Current cycle item: {% cycle example_defined_variable
example_defined_variable2 %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34468#comment:1>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701875a849293-1c41831e-ea76-44f5-9317-38f5a5d68193-000000%40eu-central-1.amazonses.com.