diff --git a/app/routes.py b/app/routes.py index 84cdd55..6ceffe2 100644 --- a/app/routes.py +++ b/app/routes.py @@ -12,11 +12,11 @@ def index(): def download(): form = DownloadForm() if form.validate_on_submit(): - return render_template('download_thanks.html', title='Download', form=form) + return render_template('download.html', form=form, filename='test.mp3') elif request.method == 'GET': form.date.data = datetime.now() - timedelta(hours = 1) form.length.data = 60 - return render_template('download.html', title='Download', form=form) + return render_template('download.html', form=form) @app.route('/download_file/') def download_file(filename): diff --git a/app/templates/download.html b/app/templates/download.html index 1461969..243078d 100644 --- a/app/templates/download.html +++ b/app/templates/download.html @@ -1,5 +1,13 @@ {% extends "base.html" %} + +{% block head %} + {{ super() }} + {% if filename is defined %} + + {% endif %} +{% endblock %} + {% block app_content %}

Download

diff --git a/app/templates/download_thanks.html b/app/templates/download_thanks.html deleted file mode 100644 index 4e4b49c..0000000 --- a/app/templates/download_thanks.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} - -{% block head %} - {{ super() }} - -{% endblock %} - -{% block app_content %} -

Thanks!

-{% endblock %}