nicer error messages
This commit is contained in:
parent
1c8853341a
commit
2ce27fc52f
|
@ -58,12 +58,13 @@ def register_post():
|
||||||
def confirm(city, token):
|
def confirm(city, token):
|
||||||
# check whether city already exists
|
# check whether city already exists
|
||||||
if db.by_city(city):
|
if db.by_city(city):
|
||||||
return dict(error='Account already exists.')
|
return dict(error='This Account was already confirmed, please try '
|
||||||
|
'signing in.')
|
||||||
# create db-entry
|
# create db-entry
|
||||||
if db.confirm(token, city):
|
if db.confirm(token, city):
|
||||||
# :todo show info "Account creation successful."
|
# :todo show info "Account creation successful."
|
||||||
redirect('/settings')
|
redirect('/settings')
|
||||||
return dict(error='Email confirmation failed.')
|
return dict(error='Account creation failed. Please try to register again.')
|
||||||
|
|
||||||
|
|
||||||
@post('/login')
|
@post('/login')
|
||||||
|
|
Loading…
Reference in a new issue