Trees | Indices | Help |
|
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
register = template.Library()
|
|||
logger = logging.getLogger(__name__)
|
Imports: datetime, traceback, logging, settings, template
|
|
Formats a datetime.datetime object as time Ago. E.g. '3 days 2 hours 10 minutes'
|
Truncates a string after a given number of chars Argument: Number of chars to truncate after
|
Truncates a string after a given number of chars Argument: Number of chars to truncate befor
|
|
Subtracts the arg from the value
|
Filter - returns a list containing range made from given value Usage (in template): <ul>{% for i in 3|get_range %} <li>{{ i }}. Do something</li> {% endfor %}</ul> Results with the HTML: <ul> <li>0. Do something</li> <li>1. Do something</li> <li>2. Do something</li> </ul> Instead of 3 one may use the variable set in the views
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 23 15:04:49 2014 | http://epydoc.sourceforge.net |