Working with DB, admin form, WTForms, .env

This commit is contained in:
DarkCat09 2023-02-16 18:19:58 +04:00
parent 66133ac46c
commit 3f665df6a7
12 changed files with 263 additions and 25 deletions

21
templates/admin.html Normal file
View 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 %}