On Tue, Aug 18, 2009 at 11:16 AM, elminio <wgruszczyn...@gmail.com> wrote:

>
> Thanks for such a quick reply
>
> and what is i iterate through for example students
>
> {% for student in students %}
>  {{ dictionary.student.id }}
> {% endfor %}
>
> I want to have student.id as a key and in the way I did it above it
> doesnt work because dicttionary wants student as a key :)
>
> thanks for help


Not recommended: You either have to write a template tag (check google it
has been done before).

Recommended: Make the changes in the view and pass it to the templates
prepared. That is what views are for. This kind of logic should stay out of
the templates.

Hope that helps,

Michael

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to