adds template config variables (like app title)
This commit is contained in:
@@ -42,4 +42,9 @@ def create_app():
|
||||
register_api(app)
|
||||
register_filters(app)
|
||||
|
||||
@app.context_processor
|
||||
def inject_main_config():
|
||||
main_config = app.config.get('MAIN', {})
|
||||
return dict(main_config=main_config)
|
||||
|
||||
return app
|
||||
@@ -1,6 +1,6 @@
|
||||
<nav class="navbar navbar-nav navbar-expand-md bg-primary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">Torn User Activity Scraper</a>
|
||||
<a class="navbar-brand" href="/">{{ main_config.APP_TITLE }}</a>
|
||||
{% from 'bootstrap4/nav.html' import render_nav_item %}
|
||||
{{ render_nav_item('views.analyze', 'Data Visualization') }}
|
||||
{{ render_nav_item('download_results', 'Files') }}
|
||||
|
||||
Reference in New Issue
Block a user