diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py index ed90875..9423453 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -7,8 +7,13 @@ import flask_menu as menu from flask.ext import markdown from sqlalchemy import func from werkzeug.contrib.cache import SimpleCache +from urllib.parse import urlparse cache = SimpleCache() +@app.template_filter() +def domain(url): + return urlparse(url).netloc + # TODO: remove on production! @app.route('/static/<path:path>') def send_static(path): |
