1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00
django/tests/regressiontests/templates/custom.py

12 lines
244 B
Python
Raw Normal View History

from django import test
from django import template
custom_filters = """
>>> t = template.Template("{% load custom %}{{ string|trim:5 }}")
>>> ctxt = template.Context({"string": "abcdefghijklmnopqrstuvwxyz"})
>>> t.render(ctxt)
u"abcde"
"""