@@ -32,4 +32,11 @@ def create_app(test_config=None):
|
||||
from . import blog
|
||||
app.register_blueprint(blog.bp)
|
||||
|
||||
@app.context_processor
|
||||
def utility_processor():
|
||||
def get_themes():
|
||||
themes = os.listdir(app.config["THEMES_FOLDER"])
|
||||
return themes
|
||||
return dict(get_themes=get_themes)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user