From 62a47d166659aa24ec1714c82179a124ef7b70af Mon Sep 17 00:00:00 2001 From: Ivo Spijkerman Date: Wed, 15 Sep 2021 12:46:48 +0200 Subject: [PATCH] NOJIRA added runnen and autoformatted --- main.py | 2 +- run-locally.sh | 2 ++ templates/frietlijst.html | 57 ++++++++++++++++++++------------------- 3 files changed, 33 insertions(+), 28 deletions(-) create mode 100755 run-locally.sh diff --git a/main.py b/main.py index 6dc4035..649c6a9 100644 --- a/main.py +++ b/main.py @@ -98,7 +98,7 @@ def _anonymize_name(name: str) -> str: return result -def _get_data(): +def _get_data() -> DTO: credentials: Credentials = Credentials.from_service_account_file('token.json', scopes=_SCOPES) service = build('sheets', 'v4', credentials=credentials) diff --git a/run-locally.sh b/run-locally.sh new file mode 100755 index 0000000..68590e2 --- /dev/null +++ b/run-locally.sh @@ -0,0 +1,2 @@ +#!/bin/bash +functions_framework --target process \ No newline at end of file diff --git a/templates/frietlijst.html b/templates/frietlijst.html index 9e3ae90..f9d42e3 100644 --- a/templates/frietlijst.html +++ b/templates/frietlijst.html @@ -5,33 +5,36 @@ -
-

Reeds besteld

-
    - {% for applicant in dto.applicants %} -
  1. {{ applicant }}
  2. - {% endfor %} -
+
+

Reeds besteld

+
    + {% for applicant in dto.applicants %} +
  1. {{ applicant }}
  2. + {% endfor %} +
-

Streeplijst

-
    - {% for item in dto.items %} -
  • {{ item.name }}: {{ item.amount }}
  • - {% endfor %} -
-

Totaaloverzicht

-
    - {% for order in dto.orders %} -
  • - {{ order.name }} -
      - {% for item in order.items %} -
    • {{ item }}
    • - {% endfor%} -
    -
  • - {% endfor %} -
-
+

Streeplijst

+ +

Totaaloverzicht

+ +

Heb je feedback? + Klik hier!

+
\ No newline at end of file