#5865: cycle template tag should accept a single argument
-----------------------+----------------------------------------------------
Reporter: gwilson | Owner: munhitsu
Status: new | Component: Template system
Version: SVN | Resolution:
Keywords: | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-----------------------+----------------------------------------------------
Changes (by munhitsu):
* cc: [EMAIL PROTECTED] (added)
Comment:
Guys take a look at following unit test suite. Does it reflect your
expectations?
{{{
{
'cycle20': ("{% cycle colors %}", {'colors': 'red'},
template.TemplateSyntaxError),
'cycle21': ("{% cycle colors %}{% cycle colors %}", {'colors': ['red',
'blue', 'green']}, 'redblue'),
'cycle22': ("{% cycle colors %}{% cycle colors %}{% cycle colors %}",
{'colors': ['red', 'blue', 'green']}, 'redbluegreen'),
'cycle23': ("{% cycle colors %}{% cycle colors %}{% cycle colors %}{%
cycle colors %}", {'colors': ['red', 'blue', 'green']},
'redbluegreenred'),
'cycle24': ("{% cycle colors as color %}{% cycle color %}", {'colors':
['red', 'blue', 'green']}, 'redblue'),
'cycle25': ("{% cycle colors as color %}{% cycle color %}{% cycle color
%}", {'colors': ['red', 'blue', 'green']}, 'redbluegreen'),
'cycle26': ("{% cycle colors as color %}{% cycle color %}{% cycle color
%}{% cycle color %}", {'colors': ['red', 'blue', 'green']},
'redbluegreenred'),
'cycle27': ("{% for i in test %}{% cycle colors %}{{ i }},{% endfor %}",
{'test': range(5),'colors': ['a', 'b']}, 'a0,b1,a2,b3,a4,'),
}
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5865#comment:6>
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
-~----------~----~----~----~------~----~------~--~---