kopia lustrzana https://github.com/glidernet/ogn-python
Remove flask-nav package
rodzic
6c3e4509fd
commit
b78470bfc0
|
@ -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)
|
||||
|
|
|
@ -5,22 +5,52 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block navbar %}
|
||||
<div class="container">
|
||||
{{ nav.top_menubar.render() }}
|
||||
</div>
|
||||
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar-collapse-1" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">OGN DDB</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ url_for('index') }}">{{ _("Home") }}</a></li>
|
||||
<li><a href="{{ url_for('devices') }}">{{ _("Devices") }}</a></li>
|
||||
<li><a href="{{ url_for('receivers') }}">{{ _("Receivers") }}</a></li>
|
||||
<li><a href="{{ url_for('airports') }}">{{ _("Airports") }}</a></li>
|
||||
<li><a href="{{ url_for('logbook') }}">{{ _("Logbook") }}</a></li>
|
||||
<li><a href="{{ url_for('statistics') }}">{{ _("Statistics") }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-info" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<div class="container">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<!-- Categories: success (green), info (blue), warning (yellow), danger (red) -->
|
||||
{% for category, message in messages %}
|
||||
{% if category == 'message' %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{% else %}
|
||||
<div class="alert alert-{{ category }}" role="alert">
|
||||
{% endif %}
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{# application content needs to be provided in the app_content block #}
|
||||
{% block app_content %}{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block app_content %}{% endblock %}
|
||||
{%- block footer %}
|
||||
<footer class="text-center"><a href="{{ url_for('about') }}"><small>© 2019 The OGN Team</small></a></footer>
|
||||
{%- endblock footer %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
9
setup.py
9
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',
|
||||
|
|
Ładowanie…
Reference in New Issue