2 from .utils import abs_url_for
3 from urllib.parse import urlparse
7 return dict(debug=app.debug)
10 @app.context_processor
11 def inject_functions():
12 return dict(abs_url_for=abs_url_for)
14 @app.template_filter()
18 @app.template_filter()
20 return urlparse(url).netloc
22 @app.template_filter()
24 return value.strftime("%Y-%m-%d")
26 @app.template_filter()
28 return value.strftime("%Y-%m-%d %H:%M") + " UTC"