lck.django 0.8.5 documentation

This Page

lck.django.common.templatetags.strings

A set of string-related filters.

Functions

slugify(text, fallback=u'untitled-0')

A version of the builtin django.template.defaultfilters which doesn’t let empty strings as outcomes.

Template tag available in common app’s strings library.

Parameters:
  • text – the text to slugify
  • fallback – the text to return in case the builtin slugify returns an empty value
strike_empty(obj)

Converts any falsy value to u"---".

Template tag available in common app’s strings library.

title(text)

Like built-in |title filter but leaves existing caps alone, eg. 'I work for the FBI' -> 'I Work For The FBI'.

Template tag available in common app’s strings library.

transliterate(text, country_code, text_lang=u'')

If the country with the specified code is using Cyrillic alphabet, transliterates Latin strings using lck.i18n.translit.

Template tag available in common app’s strings library.