diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-03-20 02:17:33 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-03-20 02:17:33 +0000 |
| commit | d3484d96e17138a9b8d86a85d387bb6c0f7135f0 (patch) | |
| tree | c08665e71dc3eb4cb38654e3e627c22b1d0b8d09 /app/views | |
| parent | d17535fc781ff134f9800f19174154836ed89bdc (diff) | |
| download | cheatdb-d3484d96e17138a9b8d86a85d387bb6c0f7135f0.tar.xz | |
Add more details to package page
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): |
