diff --git a/scipaperloader/__init__.py b/scipaperloader/__init__.py index 7b41b7d..9cdaa9d 100644 --- a/scipaperloader/__init__.py +++ b/scipaperloader/__init__.py @@ -14,6 +14,10 @@ def create_app(test_config=None): with app.app_context(): db.create_all() + @app.context_processor + def inject_app_title(): + return {'app_title': app.config['APP_TITLE']} + from . import views app.register_blueprint(views.bp) diff --git a/scipaperloader/config.py b/scipaperloader/config.py index 037ce31..4159388 100644 --- a/scipaperloader/config.py +++ b/scipaperloader/config.py @@ -4,3 +4,4 @@ class Config: SECRET_KEY = os.environ.get('SECRET_KEY', 'dev') SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite:///papers.db') SQLALCHEMY_TRACK_MODIFICATIONS = False + APP_TITLE = os.environ.get('APP_TITLE', 'SciPaperLoader') diff --git a/scipaperloader/templates/base.html b/scipaperloader/templates/base.html index 430c9a6..ecfb288 100644 --- a/scipaperloader/templates/base.html +++ b/scipaperloader/templates/base.html @@ -2,13 +2,14 @@ - SciPaperLoader + {{ app_title }} +{% include 'nav.html' %}
{% block content %}{% endblock %}