diff --git a/app/forms.py b/app/forms.py index ca2a560..39e2a49 100644 --- a/app/forms.py +++ b/app/forms.py @@ -3,6 +3,6 @@ from wtforms import DateTimeField, DecimalField, SubmitField from wtforms.validators import DataRequired class DownloadForm(FlaskForm): - date = DateTimeField('Date', validators=[DataRequired()]) + start_time = DateTimeField('Start time', validators=[DataRequired()]) length = DecimalField('Length', validators=[DataRequired()]) submit = SubmitField('Download') diff --git a/app/routes.py b/app/routes.py index e7869e7..0798c48 100644 --- a/app/routes.py +++ b/app/routes.py @@ -7,7 +7,7 @@ from datetime import datetime, timedelta def download(): form = DownloadForm() if request.method == 'GET': - form.date.data = datetime.now() - timedelta(hours = 1) + form.start_time.data = datetime.now() - timedelta(hours = 1) form.length.data = 60 elif form.validate_on_submit(): flash('The download should start immediately.') diff --git a/app/templates/download.html b/app/templates/download.html index 243078d..5db4d41 100644 --- a/app/templates/download.html +++ b/app/templates/download.html @@ -13,9 +13,9 @@