Ajout support serveur MAIL et XMPP

This commit is contained in:
2022-08-06 18:22:24 +02:00
parent beb1e65ca7
commit d923a5eb97
44 changed files with 2177 additions and 701 deletions

View File

@@ -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)