Re: newbie: printing a date in a template

2009-02-02 Thread Malcolm Tredinnick
On Mon, 2009-02-02 at 10:08 -0800, KJ wrote: > On Feb 2, 7:11 pm, Christian Joergensen wrote: > > > > Is `todaysdate` listed in your context? > > > > This is my return line for the view, the locals() part should add all > the local variables to the template context right? > > return render_to_r

Re: newbie: printing a date in a template

2009-02-02 Thread Harryanto Ie
i think you must put like this : return render_to_response('items/browse.html', locals(), context_instance=RequestContext(request), {'todaysdate':todaysdate}) On Mon, 2 Feb 2009 10:08:37 -0800 (PST) KJ wrote: > > On Feb 2, 7:11 pm, Christian Joergensen >wrote: >> >> Is `todaysdate` l

Re: newbie: printing a date in a template

2009-02-02 Thread KJ
On Feb 2, 7:11 pm, Christian Joergensen wrote: > > Is `todaysdate` listed in your context? > This is my return line for the view, the locals() part should add all the local variables to the template context right? return render_to_response('items/browse.html', locals(), context_instance=Request

Re: newbie: printing a date in a template

2009-02-02 Thread Christian Joergensen
KJ wrote: > In my view, I have this definition: > from datetime import date > todaysdate = date.today() > > In my template, I am trying to print out this date using: > {{ todaysdate }} > > And everything else in the template prints fine, but the date doesn't > print. Is there som

newbie: printing a date in a template

2009-02-02 Thread KJ
In my view, I have this definition: from datetime import date todaysdate = date.today() In my template, I am trying to print out this date using: {{ todaysdate }} And everything else in the template prints fine, but the date doesn't print. Is there something simple I am doing wro