27 lines
821 B
HTML
Executable File
27 lines
821 B
HTML
Executable File
{% extends 'base.html' %}
|
|
|
|
{% block main %}
|
|
<div class="container">
|
|
<h1 class="page-header">Add Book</h1>
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
{% for message in messages %}
|
|
<li>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
|
|
{{ form.csrf_token }}
|
|
<div class="form-group">{{ form.title.label }} {{ form.title(size=20, class="form-control") }}</div>
|
|
<div class="form-group">{{ form.author.label }} {{ form.author(size=20, class="form-control") }}</div>
|
|
{{ form.file }}
|
|
<button type="submit" class="btn btn-primary">Upload</button>
|
|
</form>
|
|
|
|
</div>
|
|
{% endblock %}
|