Re: 'is None' in {% if %}

2010-11-25 Thread Łukasz Rekucki
On 25 November 2010 03:48, Christophe Pettus wrote: > I have a Decimal field that's blank=True, null=True, and NULL and 0.0 are > distinct values.  I'd like to do something different in a template depending > on whether or not the value is None or not, but a standard {% if field %} > treats 0.0

'is None' in {% if %}

2010-11-24 Thread Christophe Pettus
I have a Decimal field that's blank=True, null=True, and NULL and 0.0 are distinct values. I'd like to do something different in a template depending on whether or not the value is None or not, but a standard {% if field %} treats 0.0 and None the same. Right now, I'm checking is None in the a