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 pass it the date instance and the format
string as arguments. The format string would use the same pattern as
you would when using the date filter in a template.
-RD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---