jinja filter for getting an icon's SVG file contents
This commit is contained in:
parent
b43c4082a6
commit
a4b2d809f0
@ -57,6 +57,11 @@ def make_flask_callbacks(app):
|
||||
"atat_permissions": [],
|
||||
}
|
||||
|
||||
@app.template_filter('iconSvg')
|
||||
def iconSvg(name):
|
||||
with open('static/icons/'+name+'.svg') as contents:
|
||||
return contents.read()
|
||||
|
||||
|
||||
def map_config(config):
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user