Package omeroweb :: Package webgateway :: Package templatetags :: Module common_tags
[hide private]
[frames] | no frames]

Module common_tags

source code

Classes [hide private]
  SettingNode
  PluralNode
Functions [hide private]
 
setting(parser, token) source code
 
do_plural(parser, token)
Usage: {% plural quantity name_singular name_plural %}
source code
Variables [hide private]
  register = template.Library()
  logger = logging.getLogger(__name__)

Imports: datetime, traceback, logging, settings, template


Function Details [hide private]

setting(parser, token)

source code 
Decorators:
  • @register.tag

do_plural(parser, token)

source code 

Usage: {% plural quantity name_singular name_plural %}

This simple version only works with template variable since we will use blocktrans for strings.

Decorators:
  • @register.tag(name= "plural")