geo
Alex 7 years ago
parent 7b0b325ba3
commit d15ccb062e

@ -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 %}

@ -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():

Loading…
Cancel
Save