Re: Problems interating through arrays passed through render to response

2006-06-08 Thread fyleow
Thanks for the insight Barry. I think I know what's wrong with my program now. I'm passing an array of strings then trying to iterate through the strings to access a dictionary with the same name, but obviously that doesn't work. For example: keywords = ["python", "django"] First iteration wo

Re: Problems interating through arrays passed through render to response

2006-06-08 Thread spacedman
fyleow wrote: > keyword = books.objects.get(headline__icontains=keyword) I would then split/reshape this list into a list of (keyword, list_of_books) tuples, so you have a structure like this: keywordsearch = [('python', [,]), ('coding',[,])] then in the template you loop "for kwmatch in

Problems interating through arrays passed through render to response

2006-06-08 Thread fyleow
I'm pretty new to Django so I apologize if this is an elementary and obvious question. I did look through the docs but I'm still confused as to how to get this working. I'll try to describe what my website does with books as an example. Basically I have a large database with information about bo