lck.django 0.8.5 documentation

This Page

lck.django.common.templatetags.converters

A set of type-converting filters.

Functions

nullify(obj)

Converts any falsy value to None.

Template tag available in common app’s converters library.

numberify(obj, default=0)

Converts any type to int or returns a fallback number for falsy values. Except for falsy values, throws traditional ValueError if the input is uncovertable to int.

Template tag available in common app’s converters library.

Parameters:
  • obj – the object to convert
  • default – a fallback int for falsy objects