MCPcopy
hub / github.com/django/django / lazystr

Function lazystr

django/utils/functional.py:204–208  ·  django/utils/functional.py::lazystr

Shortcut for the common case of a lazy callable that returns str.

(text)

Source from the content-addressed store, hash-verified

202
203
204def lazystr(text):
205 class="st">"""
206 Shortcut for the common case of a lazy callable that returns str.
207 class="st">"""
208 return lazy(str, str)(text)
209
210
211def keep_lazy(*resultclasses):

Callers 15

test_smart_splitMethod · 0.90
test_truncate_charsMethod · 0.90
test_truncate_wordsMethod · 0.90
test_wrapMethod · 0.90
test_phone2numericMethod · 0.90
test_format_lazyMethod · 0.90
test_escapeMethod · 0.90
test_linebreaksMethod · 0.90
test_strip_tagsMethod · 0.90

Calls 1

lazyFunction · 0.85

Tested by 15

test_smart_splitMethod · 0.72
test_truncate_charsMethod · 0.72
test_truncate_wordsMethod · 0.72
test_wrapMethod · 0.72
test_phone2numericMethod · 0.72
test_format_lazyMethod · 0.72
test_escapeMethod · 0.72
test_linebreaksMethod · 0.72
test_strip_tagsMethod · 0.72