Add a license preference field
This feature is absolutely necessary. Now a user can simply define their default license and quickly go through a form, as opposed to stopping to click on the select and choosing the same option over and over again. Also added DB migration for the field, so that's working now, too. Rebased by Sebastian and made the default value to be unicode. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
committed by
Sebastian Spaeth
parent
49745d5138
commit
dc4dfbde35
@@ -41,7 +41,8 @@ def submit_start(request):
|
||||
"""
|
||||
First view for submitting a file.
|
||||
"""
|
||||
submit_form = submit_forms.SubmitStartForm(request.form)
|
||||
submit_form = submit_forms.SubmitStartForm(request.form,
|
||||
license=request.user.get('license_preference'))
|
||||
|
||||
if request.method == 'POST' and submit_form.validate():
|
||||
if not ('file' in request.files
|
||||
|
||||
Reference in New Issue
Block a user