I had just made a template tag to do exactly what you are looking for: "assign a variable or make a variable in a template", here is the link to see the code in djangosnippets:
http://www.djangosnippets.org/snippets/539/ I hope this will help. On Jan 9, 2008 6:04 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Sorry, i'm in the habit of using tabs to indent code, so I pressed tab > while editing that sinippet, then hit enter, which ended up sending > the message. > > Anyways, you could som something like: > > {% for o in some_list %} > <!--print o's data--> > {% cycle '/' '/' '/' '<br>' %} > {% endfor %} > > That should print a newline for every 3 items, then print a newline > character on the next item. > > > [EMAIL PROTECTED] wrote: > > You could use the "cycle" template tag (<a href='http:// > > www.djangoproject.com/documentation/templates/#cycle'>Documentation</a>). > > > > If your separator for a single row was a slash, you could do something > > like > > > > {% for o in some_list %} > > > > {% cycle '' 'row2' rowvar %} > > ... > > </tr> > > {% endfor %} > > > -- Lic. Jos� M. Rodriguez Bacallao Cupet ----------------------------------------------------------------- Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales ----------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---