Working with DB, admin form, WTForms, .env
This commit is contained in:
parent
66133ac46c
commit
3f665df6a7
12 changed files with 263 additions and 25 deletions
21
templates/admin.html
Normal file
21
templates/admin.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Admin{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Add a person to DB</h1>
|
||||
<form action="/add" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
{% for field in form %}
|
||||
{% if field.name != 'csrf_token' %}
|
||||
<div>
|
||||
{{ field.label }}
|
||||
{{ field }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div>
|
||||
<input type="submit" value="Add">
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue