Sunday, October 30, 2011

variables in a dict in a template

hi,

I have a dict which I use to store golf scores to display. Template
syntax is:

{{pl.1.1.scores.1.sc}} for the first hole of the first round
{{pl.1.2.scores.1.sc}} for the first hole of the second round
{{pl.1.1.scores.2.sc}} for the second hole of the first round
etc

I want to do:
{{pl.1.round_no.scores.hole_no.sc}}

where round_no and hole_no are variables passed to the template. Can it
be done?
--
regards
Kenneth Gonsalves

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

No comments:

Post a Comment