replacement of configuration variable acquisition
This commit is contained in:
parent
a6ce2c5647
commit
ff5870a33c
@ -15,14 +15,14 @@ bcrypt = Bcrypt(app)
|
|||||||
|
|
||||||
#### Variables ##################################################################################
|
#### Variables ##################################################################################
|
||||||
|
|
||||||
DATAS_USER = app.config['DOSSIER_APP']
|
DATAS_USER = app.config.get('DOSSIER_APP')
|
||||||
DOSSIER_PERSO = app.config['DOSSIER_APP']
|
DOSSIER_PERSO = app.config.get('DOSSIER_APP')
|
||||||
extensionimg = app.config['EXT_IMG']
|
extensionimg = app.config.get('EXT_IMG')
|
||||||
DATABASE = app.config['DATABASE']
|
DATABASE = app.config.get('DATABASE')
|
||||||
MAIL_SERVER = app.config['MAIL_SERVER']
|
MAIL_SERVER = app.config.get('MAIL_SERVER')
|
||||||
XMPP_SERVER = app.config['XMPP_SERVER']
|
XMPP_SERVER = app.config.get('XMPP_SERVER')
|
||||||
SETUID = app.config['SETUID']
|
SETUID = app.config.get('SETUID')
|
||||||
BASE_URL = app.config['BASE_URL']
|
BASE_URL = app.config.get('BASE_URL')
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ def signin(token) :
|
|||||||
client_plateform=request.headers.get('User-Agent')
|
client_plateform=request.headers.get('User-Agent')
|
||||||
|
|
||||||
log=time_create_user + ' - ' + ip_address + ' - ' + user + ' - ' + client_plateform + '\n' + '---> ' + 'Création du compte \n'
|
log=time_create_user + ' - ' + ip_address + ' - ' + user + ' - ' + client_plateform + '\n' + '---> ' + 'Création du compte \n'
|
||||||
log_file=DOSSIER_PERSO+user+"/log.txt"
|
log_file=os.path.join(DOSSIER_PERSO,user,"log.txt")
|
||||||
try:
|
try:
|
||||||
with open(log_file, 'x') as file:
|
with open(log_file, 'x') as file:
|
||||||
file.write(log)
|
file.write(log)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user