Re: Accessing dictionaries in templates in a sorted manner

2009-06-15 Thread Tom Evans
On Fri, 2009-06-12 at 04:48 +0700, Yuri Baburov wrote: > Hi Tom, > > SortedDict(yourdict) is a hard thing and takes a lot of tinkering? > don't you have python 2.4 to use sorted(dict.iteritems())? > can't write your own python function to do this in your views side? > > next, |dictsort:"0" is wo

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread M. N. Islam Shihan
There would be an easy work arround I think. As django support and encourage custom django tags and filters in apps, you might want to copy the existing code of current working dicsort filter into your own app, rename it to something different than "dicsort" and use that renamed filter in

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Yuri Baburov
Hi Tom, SortedDict(yourdict) is a hard thing and takes a lot of tinkering? don't you have python 2.4 to use sorted(dict.iteritems())? can't write your own python function to do this in your views side? next, |dictsort:"0" is working for at least two years and is pretty stable functionality. even

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Guillem
On Jun 11, 6:51 pm, Tom Evans wrote: > Thanks, that actually *is* the answer: undocumented feature, do not > expect it to work in the long term. > I will come up with a different way to manage it - all I am trying to do > is write manageable code that doesn't require my knowledge to maintain. > >

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Tom Evans
On Thu, 2009-06-11 at 11:30 -0400, Karen Tracey wrote: > On Thu, Jun 11, 2009 at 11:07 AM, Tom Evans > wrote: > > > > I appreciate that; I'm asking if this undocumented feature is > expected > to work for the foreseeable future, and not likely to

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Karen Tracey
On Thu, Jun 11, 2009 at 11:07 AM, Tom Evans wrote: > > I appreciate that; I'm asking if this undocumented feature is expected > to work for the foreseeable future, and not likely to be changed in the > future development of django. This, in my mind, is pertinent to > django-developers. > > Cheers

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Tom Evans
On Thu, 2009-06-11 at 09:37 -0500, Alex Gaynor wrote: > > > On Thu, Jun 11, 2009 at 4:09 AM, Tom Evans > wrote: > > > On Wed, 2009-06-10 at 06:54 -0700, Adrian Rogers wrote: > > On Jun 9, 11:09 am, Tom Evans > wrote: > > > Hi all > > >

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Alex Gaynor
On Thu, Jun 11, 2009 at 4:09 AM, Tom Evans wrote: > > On Wed, 2009-06-10 at 06:54 -0700, Adrian Rogers wrote: > > On Jun 9, 11:09 am, Tom Evans wrote: > > > Hi all > > > > > > I was struggling to turn a typical template dictionary iteration use > > > case into a sorted dictionary iteration, and

Re: Accessing dictionaries in templates in a sorted manner

2009-06-11 Thread Tom Evans
On Wed, 2009-06-10 at 06:54 -0700, Adrian Rogers wrote: > On Jun 9, 11:09 am, Tom Evans wrote: > > Hi all > > > > I was struggling to turn a typical template dictionary iteration use > > case into a sorted dictionary iteration, and struggling to find any way > > of managing it. > > > > Eg: > > >