#5865: cycle template tag should accept a single argument
-----------------------+----------------------------------------------------
Reporter: gwilson | Owner: munhitsu
Status: closed | Component: Template system
Version: SVN | Resolution: fixed
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-----------------------+----------------------------------------------------
Changes (by munhitsu):
* status: new => closed
* has_patch: 0 => 1
* resolution: => fixed
Comment:
Seems to be working. Old regression is passing. New has been added.
I've added a small enhancement - a cycle pushed to context. Thanks to it
cycle internals can be used inside template.
{{{
context['cycle'] = {
# cycle internals
'collection': self.collection,
'name':self.variable_name,
'value':value,
}
}}}
One note. Last part of syntax parsing has to be done in render method. We
need context to say if {% cycle colors %} refers to table or is a mistake.
--
Ticket URL: <http://code.djangoproject.com/ticket/5865#comment:7>
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
-~----------~----~----~----~------~----~------~--~---