datetime problemi...
parent
0ed349e53d
commit
a4f8c0aa8e
12
app.py
12
app.py
|
@ -1,17 +1,16 @@
|
|||
from collections import UserList
|
||||
import os
|
||||
from flask import Flask, redirect, render_template, session, request, url_for
|
||||
from datetime import date
|
||||
|
||||
from sqlalchemy import case
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from auth import login_required, bp as auth_bp
|
||||
from deck import bp as deck_bp
|
||||
from menu import bp as menu_bp
|
||||
from upload import bp as upload_bp
|
||||
from flask import Flask, redirect, render_template, session, request, url_for
|
||||
|
||||
from create_db import Card, Deck
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from config import CONFIG
|
||||
|
||||
from get_public_links import test_file
|
||||
|
@ -86,7 +85,8 @@ def create_app(test_config=None):
|
|||
elif rate == "No":
|
||||
k = 0.1
|
||||
dbsession.query(Card).filter(Card.id == card.id).update({'interest_rate': abs(card.interest_rate*k)})
|
||||
|
||||
|
||||
dbsession.query(Card).filter(Card.id == card.id).update({'last_review': date()})
|
||||
dbsession.query(Deck).filter(Deck.owner_id == user_id, Deck.id == deck_id).update({'current_card': current_card+1})
|
||||
dbsession.commit()
|
||||
return render_template("deck/index.html", username=username, card = card) # no idea kaj se tu dogaja...
|
||||
|
|
Loading…
Reference in New Issue