diff --git a/.gitignore b/.gitignore index ab3e8ce..29c1a0a 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,4 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +config.ini \ No newline at end of file diff --git a/app/app.py b/app/app.py index cf2ce7f..22688e7 100644 --- a/app/app.py +++ b/app/app.py @@ -1,21 +1,28 @@ from flask import * from os import path, walk +import configparser + +config = configparser.ConfigParser() +config.read('config.ini') + +instanceBranding = str(config['BRANDING']['instanceName']) + app = Flask(__name__) @app.route('/') def home(): - return render_template('index.j2', instanceName="nyxask.nixos.internal", instanceBranding="NyxAsk Testing Instance") + return render_template('index.j2', instanceName="nyxask.nixos.internal", instanceBranding=instanceBranding) @app.route('/auth/login/') def login(): - return render_template('login.j2', instanceName="nyxask.nixos.internal", instanceBranding="NyxAsk Testing Instance") + return render_template('login.j2', instanceName="nyxask.nixos.internal", instanceBranding=instanceBranding) @app.route('/auth/register/') def register(): - return render_template('register.j2', instanceName="nyxask.nixos.internal", instanceBranding="NyxAsk Testing Instance") + return render_template('register.j2', instanceName="nyxask.nixos.internal", instanceBranding=instanceBranding) @app.route('/assets/css/index.css') def index_css(): diff --git a/config.sample.ini b/config.sample.ini new file mode 100644 index 0000000..3419345 --- /dev/null +++ b/config.sample.ini @@ -0,0 +1,2 @@ +[BRANDING] +instanceName = NyxAsk Sample Config \ No newline at end of file