This commit is contained in:
Alex 2018-05-31 18:34:50 +02:00
parent 7b0b325ba3
commit d15ccb062e
2 changed files with 4 additions and 3 deletions

View File

@ -63,9 +63,10 @@
</table> </table>
</div> </div>
<br> <br>
<div class="form-group">{{ form.tag.label }} {{ form.tag(size=20, class="form-control") }}</div> <div class="form-group">{{ form.category.label }} {{ form.category(size=20, class="form-control") }}</div>
{{ form.file }} {{ form.file }}
<button type="submit" class="btn btn-primary">Upload</button> {{ form.upload }}
{{ form.wish }}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -153,7 +153,7 @@ def edit_book_by_id(id):
@app.route('/add-book', methods=['POST', 'GET']) @app.route('/add-book', methods=['POST', 'GET'])
def add_book(): def add_book():
upload_form = UploadForm() upload_form = UploadForm()
if request.method == 'POST': if request.method == 'POST':
if upload_form.validate_on_submit(): if upload_form.validate_on_submit():