From b78470bfc01da9852f56d267d34f264d78f70a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Fri, 30 Aug 2019 08:15:29 +0200 Subject: [PATCH] Remove flask-nav package --- ogn_python/__init__.py | 2 -- ogn_python/templates/base.html | 60 +++++++++++++++++++++++++--------- setup.py | 9 +++-- 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/ogn_python/__init__.py b/ogn_python/__init__.py index ceedebf..ad25bd5 100644 --- a/ogn_python/__init__.py +++ b/ogn_python/__init__.py @@ -5,7 +5,6 @@ from flask_migrate import Migrate from flask_caching import Cache from celery import Celery -from ogn_python.navigation import nav from ogn_python.flask_celery import make_celery # Initialize Flask @@ -21,4 +20,3 @@ db = SQLAlchemy(app) migrate = Migrate(app, db) cache = Cache(app) celery = make_celery(app) -nav.init_app(app) diff --git a/ogn_python/templates/base.html b/ogn_python/templates/base.html index 9758374..6e9e273 100644 --- a/ogn_python/templates/base.html +++ b/ogn_python/templates/base.html @@ -5,22 +5,52 @@ {% endblock %} {% block navbar %} -
- {{ nav.top_menubar.render() }} -
+ + {% endblock %} {% block content %} -
- {% with messages = get_flashed_messages() %} - {% if messages %} - {% for message in messages %} - - {% endfor %} - {% endif %} - {% endwith %} +
+{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + + {% for category, message in messages %} + {% if category == 'message' %} + -{% endblock %} \ No newline at end of file +{% block app_content %}{% endblock %} +{%- block footer %} + +{%- endblock footer %} +
+{% endblock %} diff --git a/setup.py b/setup.py index 11302b1..029874d 100644 --- a/setup.py +++ b/setup.py @@ -33,12 +33,11 @@ setup( packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'Flask==1.1.1', - 'flask-sqlalchemy==2.4.0', + 'Flask-SQLAlchemy==2.4.0', 'Flask-Migrate==2.5.2', - 'flask-bootstrap==3.3.7.1', - 'flask-nav==0.6', - 'flask-wtf==0.14.2', - 'flask-caching==1.7.2', + 'Flask-Bootstrap==3.3.7.1', + 'Flask-WTF==0.14.2', + 'Flask-Caching==1.7.2', 'geopy==1.20.0', 'celery==4.3.0', 'redis==3.3.8',