Re: testing equality in template tag

2014-06-26 Thread Tom Evans
On Wed, Jun 25, 2014 at 7:34 PM, Lee Hinde wrote: > with view code like so: > > import calendar > months_choices = [] > for i in range(1,13): > months_choices.append((i, calendar.month_name[i])) > context['months'] = months_choices >

Re: testing equality in template tag

2014-06-26 Thread Roman Klesel
Ugh , sorry of course we know ... forget what i said ... 2014-06-26 9:48 GMT+02:00 Roman Klesel : > hard to tell since we do not know what values default_month and month.0 have > ... > try to print in the view and examine: > print type(month[0]), month[0],

Re: testing equality in template tag

2014-06-26 Thread Roman Klesel
hard to tell since we do not know what values default_month and month.0 have ... try to print in the view and examine: print type(month[0]), month[0], type(today.month), today.month 2014-06-25 20:34 GMT+02:00 Lee Hinde : > with view code like so: > > import calendar >

testing equality in template tag

2014-06-25 Thread Lee Hinde
with view code like so: import calendar months_choices = [] for i in range(1,13): months_choices.append((i, calendar.month_name[i])) context['months'] = months_choices and context['default_month'] = today.month I have this snippet in a template (my