1 2 3 4 5 6 7 8 9 10 | # templatetags/nbsp.py
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter()
def nbsp(value):
return mark_safe(" ".join(value.split(' ')))
|
More like this
- Avoid widows using a template filter by jcroft 6 years, 2 months ago
- Filter to add zero-width space to break up long words by jayliew 8 months ago
- wordbreak filter by soniiic 4 years, 1 month ago
- Variable inspect filter by buriy 5 years ago
- Querystring Builder - create urls with GET params by jibberia 2 years, 4 months ago
Comments