diff --git a/app.py b/app.py index aadd506..d2eebc2 100755 --- a/app.py +++ b/app.py @@ -115,6 +115,12 @@ def set_url_args(**new_args): args = {k: v for k, v in args.items() if v is not None} return url_for(request.endpoint, **args) +@app.template_global() +def current_url(): + args = request.view_args.copy() + args.update(request.args) + return url_for(request.endpoint, **args) + @app.before_request def init_profile(): g.profiling = [] diff --git a/templates/item.html b/templates/item.html index dfdb11e..3a5e578 100644 --- a/templates/item.html +++ b/templates/item.html @@ -88,7 +88,7 @@
Connect with Wikidata {% endif %} {% if username %}