replacement of configuration variable acquisition
This commit is contained in:
parent
1f92257ca8
commit
c669987ae7
@ -11,19 +11,19 @@ app.config.from_pyfile('config.py')
|
|||||||
|
|
||||||
#### Variables ####################################################################################
|
#### Variables ####################################################################################
|
||||||
|
|
||||||
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')
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
|
|
||||||
@logs.route('/logs/')
|
@logs.route('/logs/')
|
||||||
@login_required
|
@login_required
|
||||||
def logfile():
|
def logfile():
|
||||||
UTILISATEUR='%s'% escape(session['username'])
|
user='%s'% escape(session['username'])
|
||||||
log_file=os.path.join(DOSSIER_PERSO, UTILISATEUR, "log.txt")
|
log_file=os.path.join(DOSSIER_PERSO, user, "log.txt")
|
||||||
with open(log_file, 'r') as log:
|
with open(log_file, 'r') as log:
|
||||||
logs=log.readlines()
|
logs=log.readlines()
|
||||||
log.close()
|
log.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user