Home | Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__revision__ = "$Id: pytils_numeral.py 102 2007-07-12 12:33:36
|
|||
__id__ = "$Id: pytils_numeral.py 102 2007-07-12 12:33:36Z the.
|
|||
__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: django.template, django.conf, numeral, utils
|
Choose proper form for plural. Value is a amount, parameters are forms of noun. Forms are variants for 1, 2, 5 nouns. It may be tuple of elements, or string where variants separates each other by comma. Examples:{{ some_int|choose_plural:"пример,примера,примеров" }} |
Get proper form for plural and it value. Value is a amount, parameters are forms of noun. Forms are variants for 1, 2, 5 nouns. It may be tuple of elements, or string where variants separates each other by comma. You can append 'absence variant' after all over variants Examples:{{ some_int|get_plural:"пример,примера,примеров,нет примеров" }} |
In-words representation of amount. Parameter is a gender: MALE, FEMALE or NEUTER Examples:{{ some_int|in_words }} {{ some_other_int|in_words:FEMALE }} |
in_words and choose_plural in a one flask Makes in-words representation of value with choosing correct form of noun. First parameter is an amount of objects. Second is a gender (MALE, FEMALE, NEUTER). Third is a variants of forms for object name. Examples:{% sum_string some_int MALE "пример,примера,примеров" %} {% sum_string some_other_int FEMALE "задача,задачи,задач" %} |
|
__revision__
|
__id__
|
__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 |