On 23-08-11 21:16, Tony Schmidt wrote:
I thought this should be the proper syntax in my template:{{ MYDICT.myform.somefield.value }} But I get a "can't parse remainder error." Just putting {{ myform.somefield.value }} gives me "3" and {{ MYDICT. 3 }} gives me the dictionary value I want. Am I missing something?
MYDICT.myform looks up an 'myform' attribute on MYDICT or the 'myform' key in the MYDICT dictionary. Which doesn't exist.
There's no way the template language can know that it first has to look up the last three items and then apply that to the first item. That's the basic problem.
Best solution probably: just do the MYDICT[myform.somefield.value] in your view and pass the value to the template?
Reinout -- Reinout van Rees http://reinout.vanrees.org/ [email protected] http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

