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:
> 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 in [A to Z] %} <---- how do I write this line in a template?
> >    <a href=/contacts/entity/?index={{letter}}/>{{letter}}</a>&nbsp;
> > {% endfor %}
>
> > Thanks in advance
> > Regards Ganesh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to