Work to flask derrière Nginx
This commit is contained in:
@@ -18,6 +18,8 @@ DATABASE = app.config['DATABASE']
|
||||
MAIL_SERVER = app.config['MAIL_SERVER']
|
||||
XMMP_SERVER = app.config['XMPP_SERVER']
|
||||
SETUID = app.config['SETUID']
|
||||
BASE_URL = app.config['BASE_URL']
|
||||
|
||||
#################################################################################################
|
||||
|
||||
|
||||
@@ -103,17 +105,18 @@ def signin(token) :
|
||||
conn.commit()
|
||||
|
||||
flash(u'Inscription réalisée avec succés !', 'succes')
|
||||
resp = redirect(url_for('loginlogout.login', _external=True))
|
||||
resp = redirect(url_for('loginlogout.login'))
|
||||
else:
|
||||
flash(u'Les mots de passe ne sont pas identiques !', 'error')
|
||||
resp = render_template('inscription.html',
|
||||
signin_enable=app.config['SIGNIN_ENABLE'],
|
||||
hostname=hostname)
|
||||
else :
|
||||
url_inscription = BASE_URL+'invitation/'+token
|
||||
resp = render_template('inscription.html',
|
||||
signin_enable=app.config['SIGNIN_ENABLE'],
|
||||
token=token, hostname=hostname, base_url=request.base_url)
|
||||
token=token, hostname=hostname, url_inscription=url_inscription)
|
||||
else:
|
||||
resp = redirect(url_for('index', _external=True), code=401)
|
||||
resp = redirect(BASE_URL, code=401)
|
||||
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user