display flashed messages
This commit is contained in:
parent
64772b13ba
commit
87d4f88bcb
2 changed files with 11 additions and 0 deletions
|
@ -12,6 +12,7 @@ def index():
|
||||||
def download():
|
def download():
|
||||||
form = DownloadForm()
|
form = DownloadForm()
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
|
flash('The download should start immediately.')
|
||||||
return render_template('download.html', form=form, filename='test.mp3')
|
return render_template('download.html', form=form, filename='test.mp3')
|
||||||
elif request.method == 'GET':
|
elif request.method == 'GET':
|
||||||
form.date.data = datetime.now() - timedelta(hours = 1)
|
form.date.data = datetime.now() - timedelta(hours = 1)
|
||||||
|
|
|
@ -3,7 +3,17 @@
|
||||||
{% block title %}Prolefeeder{% endblock %}
|
{% block title %}Prolefeeder{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<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 %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue