Re: iterate over alphabet in template

2008-06-18 Thread M.Ganesh
Ned Batchelder wrote: > If you wanted to keep the alphabet issue out of the view, you could > also do this: > > {% for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" %} > > --Ned. > http://nedbatchelder.com > Super. I was just wondering how to do it. Thanks Ned Regards Ganesh --~--~-~--~~

Re: iterate over alphabet in template

2008-06-17 Thread Ned Batchelder
If you wanted to keep the alphabet issue out of the view, you could also do this: {% for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" %} --Ned. http://nedbatchelder.com M.Ganesh wrote: > Joel Bernstein wrote: > >> For an easy (but locale-dependent) way to get a list of the uppercase >> characters

Re: iterate over alphabet in template

2008-06-17 Thread M.Ganesh
Joel Bernstein wrote: > For an easy (but locale-dependent) way to get a list of the uppercase > characters in Python, try string.uppercase > > http://www.python.org/doc/2.3/lib/module-string.html > > Just add that list to your context, and you should be ready to go. > > On Jun 17, 12:03 pm, "Richa

Re: iterate over alphabet in template

2008-06-17 Thread Joel Bernstein
For an easy (but locale-dependent) way to get a list of the uppercase characters in Python, try string.uppercase http://www.python.org/doc/2.3/lib/module-string.html Just add that list to your context, and you should be ready to go. On Jun 17, 12:03 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote:

Re: iterate over alphabet in template

2008-06-17 Thread Richard Dahl
I would probably just pass in a python list with all of the letters in the alphabet, then just {% for l in alphabet_list %} ... -richard On 6/17/08, M.Ganesh <[EMAIL PROTECTED]> wrote: > > > Hi All, > > I am relatively new to both python and django. Please help me to do this : > > {% for letter