Thank you this was exactly my problem!!

On Thursday, April 4, 2013 5:23:17 PM UTC-4, Moritz Schlarb wrote:
>
> Do you have that in a function definition?
> E.g. def index(self, today=datetime.date.today())?
>
> Then it would be clear, because that line is only evaluated once, when the 
> module is loaded, I think.
> You should be better off with a default of today=None and then doing 
> something like if not today: today = datetime.date.today()
>
> Regards,
> Moritz
>
> On Thursday, April 4, 2013 10:53:28 PM UTC+2, pkraus wrote:
>>
>> I have an app that seems to be caching the date. For instance i have a 
>> page which gets today = datetime.date.today() and then uses the result in a 
>> sqlquery. This works fine on the same day that app is started. After that i 
>> have to restart paster for it work correctly as it still see "today" as 
>> "yesterday".
>>
>> Thoughts?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to