Re: A question on lists and sorting, to prepare for a template

2007-08-08 Thread RajeshD
{'Breakfast':[{'day':'1', 'main_course':'pancakes', 'beverage':'milk'}, {'day':'3', 'main_course':'cereal', 'beverage':'orange_juice'}, {'day':'2', 'main_course':'waffles', 'beverage':'milk'}], 'Supper': [{'day':'1', 'main_course':'spaghetti', 'beverage':'water'}, {'day':'2', 'main_course':'pork_c

A question on lists and sorting, to prepare for a template

2007-08-08 Thread drkfce
I have a views code that produces a dictionary like the one below, and I want to get them in order in accordance to the keys within the dicts; how can one do that? Example: {'Breakfast':[{'day':'1', 'main_course':'pancakes', 'beverage':'milk'}, {'day':'3', 'main_course':'cereal', 'beverage':'ora