Add login_required decorator
This commit is contained in:
15
pywallter.py
15
pywallter.py
@@ -18,7 +18,7 @@ from views.logs import logs
|
||||
from views.loginlogout import loginlogout
|
||||
from views.gallery import mygallery
|
||||
|
||||
from tools.databaseinit import init_db, init_dir, db_migrate
|
||||
from tools.databaseinit import init_db, check_directories, db_migrate
|
||||
|
||||
import glob, os, sys, time
|
||||
|
||||
@@ -26,22 +26,25 @@ app = Flask( 'pywallter' )
|
||||
app.config.from_pyfile('config.py')
|
||||
bcrypt = Bcrypt(app)
|
||||
|
||||
init_db()
|
||||
db_migrate()
|
||||
if init_dir():
|
||||
print ("Le repertoire des utilisateurs a été créer")
|
||||
|
||||
|
||||
|
||||
#### Variables Globales #########################################################################
|
||||
|
||||
|
||||
DOSSIER_PERSO= app.config['DOSSIER_APP']
|
||||
|
||||
DATABASE= app.config['DATABASE']
|
||||
extensionimg = app.config['EXT_IMG']
|
||||
MAIL_SERVER = app.config['MAIL_SERVER']
|
||||
XMPP_SERVER = app.config['XMPP_SERVER']
|
||||
#################################################################################################
|
||||
|
||||
init_db(DATABASE)
|
||||
check_directories(DOSSIER_PERSO)
|
||||
db_migrate(DATABASE)
|
||||
|
||||
|
||||
|
||||
xmpp_server_not_installed = system('whereis prosodyctl')
|
||||
mail_server_not_installed = system('whereis set_mail_alias') + system('whereis set_mail_passwd') + \
|
||||
system('whereis dovecot') + system('whereis smtpd')
|
||||
|
||||
Reference in New Issue
Block a user