Added a filter 'nbsp' to turn spaces into nonbreaking-space characters.
- Legacy-Id: 11532
This commit is contained in:
parent
e34a5caed4
commit
2b55d20371
|
@ -616,3 +616,7 @@ def format_timedelta(timedelta):
|
|||
hours, remainder = divmod(s, 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
return '{hours:02d}:{minutes:02d}'.format(hours=hours,minutes=minutes)
|
||||
|
||||
@register.filter()
|
||||
def nbsp(value):
|
||||
return mark_safe(" ".join(value.split(' ')))
|
||||
|
|
Loading…
Reference in a new issue