Re: How to compare two different types in templates using ifequal

2009-03-02 Thread Malcolm Tredinnick
On Mon, 2009-03-02 at 01:41 -0800, eli wrote: [...] > I have no idea where is the bug... In all cases you are likely making assumptions about what the filters are returning that are likely not correct. One way Insert the values of the filters into your template and have a look at what they are re

Re: How to compare two different types in templates using ifequal

2009-03-02 Thread Darek
On Mar 2, 11:41 am, Alex Koshelev wrote: > Just now {% ifequal %} doesn't support filter expressions as arguments. So > you must prepare values by {% with %} tag before using them in {% ifequal > %}. Thank You, I will try it later.. ps. I'm sorry for double-post. --~--~-~--~~--

How to compare two different types in templates using ifequal

2009-03-02 Thread eli
Hi, I have a problem (Django 1.1. alpha SVN): Python: week = [1, 2, 3, 4, 5, 6, 7] # There are only two records in objects_list with date_start field = 01.01.2000 and 02.01.2000 objects_list = SomeModel.objects.all() Template: {% for day in week %} {% for e in objects_list %} {# date:"j

Re: How to compare two different types in templates using ifequal

2009-03-02 Thread Alex Koshelev
Just now {% ifequal %} doesn't support filter expressions as arguments. So you must prepare values by {% with %} tag before using them in {% ifequal %}. On Mon, Mar 2, 2009 at 12:22 PM, eli wrote: > > Hi, > > I have a problem: > > Python: > week = [1, 2, 3, 4, 5, 6, 7] > # There are only two re

How to compare two different types in templates using ifequal

2009-03-02 Thread eli
Hi, I have a problem: Python: week = [1, 2, 3, 4, 5, 6, 7] # There are only two records in objects_list with date_start field = 01.01.2000 and 02.01.2000 objects_list = SomeModel.objects.all() Template: {% for day in week %} {% for e in objects_list %} {% ifequal e.date_start|date:"j" da