Re: accessing dictionary elements in opening tag of django template for loop

2008-05-16 Thread John
Thanks, John. Your second suggestion (that I find a way to modify the Document class) put me on the right track. I eventually found this article: http://blog.arbingersys.com/2008/04/google-app-engine-better-many-to-many.html which worked for my problem. On May 14, 7:17 pm, "John Lenton"

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John Lenton
On Wed, May 14, 2008 at 6:33 PM, John <[EMAIL PROTECTED]> wrote: > > I'm having trouble accessing dictionary elements within a nested for > loop. here are some code snippets: > > [...] > > # so far so good, but then I try to iterate over the documents and > their associated tags in a template >

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John
Thanks for the response, Norman! Unfortunately, the Google App Engine version of Django doesn't support the 'with' tag (which would otherwise solve my problem). Also, I don't think I can pass in a context var that already has the list I want, because I need a list *per* document. Any

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread Norman Harman
Sorry, I don't know the exact answer but I can point you in right direction. templates always use dot notation for dictionary access tag_dict.document.uid But I don't think that will work inside a "for" tag and also won't work cause you want the document.uid to be key not "document". The

accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John
Hello Django Users, I'm having trouble accessing dictionary elements within a nested for loop. here are some code snippets: # here is the python code that sets up the page class DocumentPage(webapp.RequestHandler): def get(self): # get a list of documents from google app engine datastore