Here are the examples of the python api django.template.TOKEN_BLOCK taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : tests.py
with Apache License 2.0
from lumanjiao
with Apache License 2.0
from lumanjiao
def test_token_smart_split(self):
# Regression test for #7027
token = template.Token(template.TOKEN_BLOCK, 'sometag _("Page not found") value|yesno:_("yes,no")')
split = token.split_contents()
self.assertEqual(split, ["sometag", '_("Page not found")', 'value|yesno:_("yes,no")'])
@override_settings(SETTINGS_MODULE=None, TEMPLATE_DEBUG=True)