From a50c42797150b098815bc73cd7a76d5874ff8f6a Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 27 Jul 2017 22:01:18 +0000 Subject: [PATCH] URLs for static files work again. git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2673 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- wradmin/genshi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wradmin/genshi.py b/wradmin/genshi.py index 6002843..63a510a 100644 --- a/wradmin/genshi.py +++ b/wradmin/genshi.py @@ -1,9 +1,13 @@ import os import genshi.template +from flask import url_for class PylonsHelper: - def url(self, controller, action=None): + def url(self, filename=None, controller=None, action=None): + if filename is not None and filename.startswith('/'): + filename = filename[1:] + return url_for('static', filename=filename) return '' def wiki(self, page_title=None): -- 2.39.5