add flask-bootstrap

stable
neingeist 7 years ago
parent 5358ea95d6
commit c56c1226d3

@ -1,7 +1,9 @@
from flask import Flask from flask import Flask
from flask_bootstrap import Bootstrap
from config import Config from config import Config
app = Flask(__name__) app = Flask(__name__)
Bootstrap(app)
app.config.from_object(Config) app.config.from_object(Config)
from app import routes from app import routes

@ -1,23 +1,9 @@
<!DOCTYPE html> {% extends "bootstrap/base.html" %}
<html>
<head> {% block title %}Prolefeeder{% endblock %}
<title>Prolefeeder</title> {% block content %}
</head> <div class="container">
<body> {% block app_content %}
<div> {% endblock %}
<a href="{{ url_for('index') }}">Home</a>
<a href="{{ url_for('download') }}">Download</a>
</div> </div>
<hr> {% endblock %}
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</body>
</html>

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block app_content %}
<h1>Download</h1> <h1>Download</h1>
<form action="" method="post" novalidate> <form action="" method="post" novalidate>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block app_content %}
<h1>Hello!</h1> <h1>Hello!</h1>
{% endblock %} {% endblock %}

@ -1,3 +1,4 @@
flask flask
flask-bootstrap
flask-wtf flask-wtf
python-dotenv python-dotenv

Loading…
Cancel
Save