fixed website

This commit is contained in:
2025-05-20 15:59:09 +02:00
parent 1c5b8e2298
commit 8330b73cd1
12 changed files with 701 additions and 37 deletions

View File

@@ -215,7 +215,8 @@ def serve_deck(deck, path='index.html'):
def admin():
deck_form = DeckForm()
password_form = PasswordForm()
password_form.value.data = generate_password()
if request.method == 'GET':
password_form.value.data = generate_password()
deck_form.deck.choices = get_available_decks(current_app)
decks = db.session.scalars(db.select(Deck).order_by(Deck.name)).all()
passwords = db.session.scalars(db.select(Password)).all()