add config.ini and save db during upgrade
This commit is contained in:
parent
6ce7ab25d9
commit
b74c6a87b9
2
flaskapp/config.ini
Normal file
2
flaskapp/config.ini
Normal file
@ -0,0 +1,2 @@
|
||||
[sectionname]
|
||||
CONFIGVARIABLE = testvalue
|
@ -2,6 +2,14 @@ from flask import render_template, request, redirect
|
||||
from flaskapp import app, db
|
||||
from flaskapp.functions import *
|
||||
from flaskapp.models import *
|
||||
import configparser
|
||||
|
||||
CONFIG_PATH = "/var/flaskapp/flaskapp/config.ini"
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read(CONFIG_PATH)
|
||||
|
||||
CONFIGVARIABLE = config.get('sectionname', 'CONFIGVARIABLE')
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
def index():
|
||||
|
Loading…
Reference in New Issue
Block a user