new view, gnome extension
This commit is contained in:
@@ -9,4 +9,12 @@ def create_app():
|
||||
app.debug = True
|
||||
app.register_blueprint(dm.dmbp)
|
||||
|
||||
# Register custom Jinja2 filters
|
||||
@app.template_filter('hash')
|
||||
def hash_filter(s):
|
||||
"""Return hash of string for consistent color generation"""
|
||||
if s is None:
|
||||
return 0
|
||||
return hash(str(s))
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user