You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
279 B
Python
15 lines
279 B
Python
2 years ago
|
from monero.numbers import from_atomic
|
||
|
from quart import Blueprint
|
||
|
|
||
|
|
||
|
bp = Blueprint('filters', 'filters')
|
||
|
|
||
|
|
||
|
@bp.app_template_filter('atomic')
|
||
|
def atomic(amt):
|
||
|
return float(from_atomic(amt))
|
||
2 years ago
|
|
||
|
|
||
|
@bp.app_template_filter('shorten')
|
||
|
def shorten(s):
|
||
|
return f"{s[:6]}...{s[-6:]}"
|