mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Create filters.py
This commit is contained in:
parent
1bd2e38196
commit
4e710f503a
10
tubesync/sync/templatetags/filters.py
Normal file
10
tubesync/sync/templatetags/filters.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from django import template
|
||||||
|
from django.template.defaultfilters import filesizeformat
|
||||||
|
|
||||||
|
register = template.Library()
|
||||||
|
|
||||||
|
@register.filter(is_safe=True)
|
||||||
|
def bytesformat(input):
|
||||||
|
intermediate = filesizeformat(input)
|
||||||
|
return intermediate.replace('B', 'iB')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user