diff options
author | Aira Kyytsönen <akyytson@local> | 2023-12-12 01:59:51 +0200 |
---|---|---|
committer | Aira Kyytsönen <akyytson@local> | 2023-12-12 01:59:51 +0200 |
commit | 84d1277c408038ab0df6179659c68ac7f08a098f (patch) | |
tree | 8a6f374e9810198a8559d8a236f8179c909c1fe7 /routes/base.py | |
parent | 3dc9e71b7c733e7fe6fe9e226ad363f84a2e1dee (diff) |
Changing database variable D to db. Making error and infomessages dissapear.
Diffstat (limited to 'routes/base.py')
-rw-r--r-- | routes/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/base.py b/routes/base.py index a9c0e19..52db258 100644 --- a/routes/base.py +++ b/routes/base.py @@ -1,5 +1,5 @@ from secrets import token_urlsafe -from app import app, D +from app import app, db from flask import render_template,session,request,redirect from routes.tools import rows2dicts, get_alert, get_nick, csrf_check @@ -42,10 +42,10 @@ def new_nick(): if not nick.isalnum(): session["alert"]="Nimimerkissä saa olla vain kirjaimia ja numeroita." return redirect(next) - if D.user.exists(nick): + if db.user.exists(nick): session["alert"]="Nimimerkki jonka olet ottamassa on jo varattu." return redirect(next) - session["id"] = int(D.user.new(nick)) + session["id"] = int(db.user.new(nick)) return redirect(next) |