On Aug 18, 7:20 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> actually I have to do it in views, not template
> I need some pure python code
Django's default filters are written in pure Python ;)
You can just call the django.template.defaultfilters.date() method
directly in your view -- just p
2008/8/18 Will Rocisky <[EMAIL PROTECTED]>:
> actually I have to do it in views, not template
> I need some pure python code
All Python datetime objects support the 'strftime' method, which is
what you want to use. Consult Python's documentation for the full
details.
--
"Bureaucrat Conrad, you
actually I have to do it in views, not template
I need some pure python code
On Aug 18, 5:14 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-08-18, o godz. 13:08, przez Will Rocisky:
>
> > I have a datetime object '2008-15-06 11:12:13'
> > I want to display it like 'Ju
Will Rocisky wrote:
> I have a datetime object '2008-15-06 11:12:13'
> I want to display it like 'June 6, 2008 at 11:12'
{{ some_datevalue_object|date:"F j, Y at H:i" }}
--
Happy Hacking.
http://sphinx.net.ru
む
--~--~-~--~~~---~--~~
You received this message b
Wiadomość napisana w dniu 2008-08-18, o godz. 13:08, przez Will Rocisky:
> I have a datetime object '2008-15-06 11:12:13'
> I want to display it like 'June 6, 2008 at 11:12'
You have to format it using strftime() or in template using built-in
"date" filter. See http://www.djangoproject.com/do
On Aug 18, 12:08 pm, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I have a datetime object '2008-15-06 11:12:13'
> I want to display it like 'June 6, 2008 at 11:12'
http://www.djangoproject.com/documentation/templates/#date
--
DR
--~--~-~--~~~---~--~~
You received th
I have a datetime object '2008-15-06 11:12:13'
I want to display it like 'June 6, 2008 at 11:12'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
7 matches
Mail list logo