Home | Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|||
|
|||
|
|
|||
__revision__ = "$Id: pytils_dt.py 102 2007-07-12 12:33:36Z the
|
|||
__id__ = "$Id: pytils_dt.py 102 2007-07-12 12:33:36Z the.pythy $"
|
|||
__url__ = "$URL: https://pythy.googlecode.com/svn/tags/pytils/
|
|||
register = template.Library() Django template tag/filter registrator |
|||
encoding = conf.settings.DEFAULT_CHARSET Current charset (sets in Django project's settings) |
|||
debug = conf.settings.DEBUG Debug mode (sets in Django project's settings) |
|||
show_value = getattr(conf.settings, 'PYTILS_SHOW_VALUES_ON_ERR Show values on errors (sets in Django project's settings) |
|||
default_value = ""
|
|||
default_uvalue = u""
|
Imports: time, django.template, django.conf, dt, utils
|
Display distance of time from current time. Parameter is an accuracy level (deafult is 1). Value must be numeral (i.e. time.time() result) or datetime.datetime (i.e. datetime.datetime.now() result). Examples:{{ some_time|distance_of_time }} {{ some_dtime|distance_of_time:2 }} |
Russian strftime, formats date with given format. Value is a date (supports datetime.date and datetime.datetime), parameter is a format (string). For explainings about format, see documentation for original strftime: http://docs.python.org/lib/module-time.html Examples:{{ some_date|ru_strftime:"%d %B %Y, %A" }} |
Russian strftime with inflected day, formats date with given format (similar to ru_strftime), also inflects day in proper form. Examples:{{ some_date|ru_strftime_inflected:"in %A (%d %B %Y)" |
Russian strftime with inflected day and correct preposition, formats date with given format (similar to ru_strftime), also inflects day in proper form and inserts correct preposition. Examples:{{ some_date|ru_strftime_prepoisiton:"%A (%d %B %Y)" |
|
__revision__
|
__url__
|
show_valueShow values on errors (sets in Django project's settings)
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Thu Jul 12 20:17:53 2007 | http://epydoc.sourceforge.net |