Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-05 Thread Tom Evans
On Thu, May 5, 2011 at 12:11 PM, AJ wrote: > I see. Any clue where I can begin in my case (for filters etc.)? Thanks. > I disagree with the BDFLs on this, for me this pattern is very natural: {% for key in list_of_keys %} {{ some_dictionary[key] }} {{

Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-05 Thread AJ
I see. Any clue where I can begin in my case (for filters etc.)? Thanks. -- 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

Re: Unable to access Dictionary values in Template (object pk is the dict key)

2011-05-04 Thread Calvin Spealman
You need to construct your query in the view function to filter for the comments you want. You can't do these sorts of things from the template, and that is largely by design so that you keep your logic in one place: your views, and your presentation in one place: your template. On Wed, May 4,