replacement of configuration variable acquisition
This commit is contained in:
parent
c669987ae7
commit
2b04397f7d
@ -17,19 +17,19 @@ app = Flask( 'pywallter' )
|
|||||||
app.config.from_pyfile('config.py')
|
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')
|
||||||
DATAS_USER = app.config['DOSSIER_APP']
|
DATAS_USER = app.config.get('DOSSIER_APP')
|
||||||
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')
|
||||||
MAIL_WEBSERVICE = app.config['MAIL_WEBSERVICE']
|
MAIL_WEBSERVICE = app.config.get('MAIL_WEBSERVICE')
|
||||||
XMPP_WEBSERVICE = app.config['XMPP_WEBSERVICE']
|
XMPP_WEBSERVICE = app.config.get('XMPP_WEBSERVICE')
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
@ -49,12 +49,13 @@ def mymessaging():
|
|||||||
myemail = tmp[0]
|
myemail = tmp[0]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return render_template('mymessaging.html',
|
return render_template('mymessaging.html',
|
||||||
section="mymessaging",
|
section="mymessaging",
|
||||||
hostname=hostname,
|
hostname=hostname,
|
||||||
myemail=myemail,
|
myemail=myemail,
|
||||||
imap_address=app.config['IMAP_ADDRESS'],
|
imap_address=app.config.get('IMAP_ADDRESS'),
|
||||||
smtp_address=app.config['SMTP_ADDRESS'],
|
smtp_address=app.config.get('SMTP_ADDRESS'),
|
||||||
mail_server=MAIL_SERVER,
|
mail_server=MAIL_SERVER,
|
||||||
mail_webservice=MAIL_WEBSERVICE,
|
mail_webservice=MAIL_WEBSERVICE,
|
||||||
xmpp_server=XMPP_SERVER,
|
xmpp_server=XMPP_SERVER,
|
||||||
@ -65,8 +66,6 @@ def mymessaging():
|
|||||||
@mymailbox.route('/mymailbox/alias', methods=['GET', 'POST'] )
|
@mymailbox.route('/mymailbox/alias', methods=['GET', 'POST'] )
|
||||||
@login_required
|
@login_required
|
||||||
def myalias():
|
def myalias():
|
||||||
|
|
||||||
|
|
||||||
hostname = set_mail_domain()
|
hostname = set_mail_domain()
|
||||||
user='%s' % escape(session['username'])
|
user='%s' % escape(session['username'])
|
||||||
conn = sqlite3.connect(DATABASE) # Connexion à la base de donnée
|
conn = sqlite3.connect(DATABASE) # Connexion à la base de donnée
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user