Re: checking size of dict or list in template

2010-03-03 Thread Tom Evans
On Wed, Mar 3, 2010 at 7:52 AM, harryos wrote: > > hi > I am passing a dictionary to the template > say, > objects_status={obj1:True,   obj2:False,  obj3:True } > > In the template I want to show something like > > {%if not  len(objects.status ) %} # just to clarify the purpose..I > know len will

checking size of dict or list in template

2010-03-02 Thread harryos
hi I am passing a dictionary to the template say, objects_status={obj1:True, obj2:False, obj3:True } In the template I want to show something like {%if not len(objects.status ) %} # just to clarify the purpose..I know len will not work No objects to show {% else %} Objects are: .show th