Re: how encrypt datetime.now with python?

2009-07-30 Thread Adam Peacock
That will work, as long as the parent doesn't need to go back into a native object easily - if s/he needs to easily get back into a datetime object, use pickle: import pickle import base64 toEncode = pickle.dumps(datetime.now()) encoded = base64.encodestring(toEncode) decoded =

Re: Site wide date format

2008-07-15 Thread Adam Peacock
Thank you for the quick response - I think I'm going to go with the custom filter for maximum flexability On Jul 15, 9:25 am, "Brett Hoerner" <[EMAIL PROTECTED]> wrote: > On Tue, Jul 15, 2008 at 8:14 AM, Adam Peacock <[EMAIL PROTECTED]> wrote: > > Is this possible

Site wide date format

2008-07-15 Thread Adam Peacock
I'm looking for a consistent way to format dates across my site, without having to put the format into every template. Is it possible to set a default date format for the "date" filter? For example, I want {{ var.date|date }} to format to {{ var.date|date:"l, F j Y" }} unless I specify