master
Kostanjevec 2022-07-07 18:14:53 +02:00
parent c77d7b1cff
commit 2e2a986028
1 changed files with 2 additions and 5 deletions

7
app.py
View File

@ -1,4 +1,3 @@
import os
from flask import Flask, redirect, render_template, session, request, url_for, flash
from auth import login_required, bp as auth_bp
@ -47,9 +46,6 @@ def create_app(test_config=None):
deck_query.filter(Deck)
return index()
deck_id = deck_object.id
# Smo oddali obrazec?
if request.method == 'POST':
card_id = request.form.get('card_id', None)
@ -74,7 +70,6 @@ def create_app(test_config=None):
if not rate:
raise Exception("manjka rate info!")
if rate == "Yes":
submit_card.interest_rate = 1
@ -104,6 +99,7 @@ def create_app(test_config=None):
deck_object.current_card = next_card
dbsession.commit()
dbsession.close()
# Loudamo naslednjo karto v decku
show_card_index = deck_object.current_card
@ -130,6 +126,7 @@ def create_app(test_config=None):
print("share!!!")
return redirect(url_for("deck"))
@app.route('/logout')
def logout():
session.pop("user_id", None)