Rewrite data layer using SqlAlchemy Part 1

This commit is contained in:
2019-10-14 19:02:25 +02:00
parent f6a38cc2db
commit fccd75d6c5
51 changed files with 1297 additions and 658 deletions

View File

@@ -0,0 +1,25 @@
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% set active_page = model.active_page %}
{% block title %}{{ model.page_title }} {{ super() }}{% endblock %}
{% block page %}
<div class="text-center">
<h1>{{ model.form_title }}</h1>
{% if model.errors %}
<div class="alert alert-danger">
{% for field, errors in model.errors.items() %}
<div>
<strong class="text-capitalize">{{ field }}</strong>:
{{ errors|join(', ') }}
</div>
{% endfor %}
</div>
{% endif %}
<form action="{{ model.post_url }}" method="post">
{{ wtf.quick_form(form, button_map={'submit_button': 'primary'}, form_type='horizontal', horizontal_columns=('lg', 2, 10)) }}
</form>
</div>
{% endblock %}