From 1dad22d3e45d6506c8624e3a7111240fcc4ab786 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 15 May 2022 13:16:37 +0200 Subject: Templates. --- app/templates/add-invoice.html | 48 ------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 app/templates/add-invoice.html (limited to 'app/templates/add-invoice.html') diff --git a/app/templates/add-invoice.html b/app/templates/add-invoice.html deleted file mode 100644 index 92748be..0000000 --- a/app/templates/add-invoice.html +++ /dev/null @@ -1,48 +0,0 @@ -{# -*- mode: web; -*- #} - -{% extends "base.html" %} - - -{% block title %}Add a new invoice{% endblock %} -{% block content %} - -{% if message %} -{# the form was submitted and message exists #} -

{{ item }}

-{# links #} -

Submit another {{ item }}

-

Return to the index

- -{% else %} -{# the form is displayed when template opens via GET not POST #} - -{# show flash - based on WTForms validators see -https://pythonprogramming.net/flash-flask-tutorial/ -get_flashed_messages() exists here because of flash() in the route -function #} - -{% with errors = get_flashed_messages() %} {% if errors %} -{% for err in errors %} - -{% endfor %} -{% endif %} -{% endwith %} -{# end of flash #} - - -{# the form #} -
-
- Add a new {{ item }} to our database. - {% for field in form %} - {{ field.label() }} - {{ field() }}
- {% endfor %} -
-
- -{% endif %} -{% endblock %} -- cgit v1.2.3