Ajout support serveur MAIL et XMPP
This commit is contained in:
@@ -3,13 +3,29 @@ import glob, os, sys
|
||||
|
||||
logs = Blueprint('logs', __name__, template_folder='templates')
|
||||
|
||||
app = Flask( 'pywallter' )
|
||||
app.config.from_pyfile('config.py')
|
||||
|
||||
|
||||
#### Variables ####################################################################################
|
||||
|
||||
DOSSIER_PERSO= app.config['DOSSIER_APP']
|
||||
|
||||
extensionimg = app.config['EXT_IMG']
|
||||
|
||||
DATABASE = app.config['DATABASE']
|
||||
##################################################################################################
|
||||
|
||||
|
||||
@logs.route('/logs/')
|
||||
def logfile():
|
||||
if 'username' in session :
|
||||
with open('log.txt', 'r') as log:
|
||||
if 'username' in session:
|
||||
UTILISATEUR='%s'% escape(session['username'])
|
||||
log_file=os.path.join(DOSSIER_PERSO, UTILISATEUR, "log.txt")
|
||||
with open(log_file, 'r') as log:
|
||||
print("on passe ici")
|
||||
logs=log.readlines()
|
||||
log.close()
|
||||
for line in logs:
|
||||
return render_template('logs.html', section="Logs", logs=logs, line=line)
|
||||
return render_template('logs.html', section="Logs", logs=logs)
|
||||
else :
|
||||
return redirect(url_for('loginlogout.login', _external=True))
|
||||
return redirect(url_for('loginlogout.login', _external=True), code=401)
|
||||
|
||||
Reference in New Issue
Block a user