mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
15 lines
330 B
Python
15 lines
330 B
Python
from flask import Blueprint, current_app
|
|
from arrow import get as arrow_get
|
|
|
|
|
|
bp = Blueprint('filters', 'filters')
|
|
|
|
@bp.app_template_filter('shorten_address')
|
|
def shorten_address(a):
|
|
_p = a[0:4]
|
|
_s = a[-4:]
|
|
return f'{_p}...{_s}'
|
|
|
|
@bp.app_template_filter('humanize')
|
|
def humanize(d):
|
|
return arrow_get(d).humanize()
|