Compare commits

..

16 Commits

Author SHA1 Message Date
1f23ebfe2d fixup! Store location name, group name and tax group description in order 2023-08-21 14:45:45 +02:00
d6d8d7d6ca Store location name, group name and tax group description in order
Also delete compiled entry JS and add a Makefile
2023-08-21 14:45:45 +02:00
de427689f4 Restyle calculator 2023-08-21 14:45:45 +02:00
dd7288d1c2 Make it possible to delete orders from the cart 2023-08-21 14:45:45 +02:00
86828a67d0 Implement adding orders to the cart and viewing it 2023-08-21 14:45:45 +02:00
cb41e61c47 Make entry for submittable 2023-08-21 14:45:45 +02:00
8cb62dbacb Refactor calculator into its own module 2023-08-21 14:45:45 +02:00
d5ca5812a1 Implement price calculator 2023-08-21 14:45:45 +02:00
41a96b4ca2 Add note about entry.js to readme 2023-08-21 14:45:45 +02:00
89422aad2a Move around gross unit price input 2023-08-21 14:45:45 +02:00
f15a20589b Rewrite some of the grossUnitPrice stuff 2023-08-21 14:45:45 +02:00
4715a758a3 Refactor fronted somewhat 2023-08-21 14:45:45 +02:00
afd7e9369d First draft of elm frontend
This will probably be scrapped or rewritten
2023-08-21 14:45:45 +02:00
e9998b9e8e Remove old entry stuff 2023-08-21 14:45:45 +02:00
fe81014794 Print link with access token to stderr 2023-08-21 14:14:47 +02:00
f308bca1fb Use secrets instead of random to generate access token 2023-08-21 13:44:26 +02:00
2 changed files with 4 additions and 2 deletions

View File

@ -43,5 +43,7 @@ def create_app():
return render_template("index.html") return render_template("index.html")
print(f"Jon started. Token: {auth.ACCESS_TOKEN}", file=sys.stderr) print(f"Jon started. Token: {auth.ACCESS_TOKEN}", file=sys.stderr)
# TODO: Get host and port from config
print(f"http://localhost:5000/?token={auth.ACCESS_TOKEN}", file=sys.stderr)
return app return app

View File

@ -1,4 +1,4 @@
import random import secrets
import string import string
from flask import Blueprint, request, redirect, render_template, session from flask import Blueprint, request, redirect, render_template, session
@ -6,7 +6,7 @@ from flask import Blueprint, request, redirect, render_template, session
bp = Blueprint("auth", __name__, url_prefix="/auth") bp = Blueprint("auth", __name__, url_prefix="/auth")
ACCESS_TOKEN = "".join(random.choice(string.ascii_lowercase) for i in range(64)) ACCESS_TOKEN = "".join(secrets.choice(string.ascii_lowercase) for i in range(64))
ALLOWED_PATHS = [ ALLOWED_PATHS = [