order is important for display, I am calculating sum and average on
query objects and storing it in dictionary with key/values which are
used in a template. So I have a dictionary  something like this :
{'name': user1, 'phone': 723872, 'Total Friends': 20, 'Avg Rating' :
3.6}
so when I render I would these to appear in order.

thanks!



On Aug 28, 11:36 am, David Zhou <[EMAIL PROTECTED]> wrote:
> On Aug 28, 2008, at 12:34 PM, saeb wrote:
>
> > I am using a dictionary to render  a template. But my rendered
> > template has the key-value pair  which are out of order. Since
> > dictionary uses a hash table to store it elements, I can't rely on
> > order of  these key-value pairs. Is there any other way to render
> > bunch of key-value items from a view  in a desired order? Thanks for
> > help
>
> What are you trying to do, specifically? If order is important, why
> bother with a key? Why not just store all the values in a list?
>
> ---
> David Zhou
> [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to