Start config work
This commit is contained in:
parent
4a6ef8a047
commit
a071556e1f
3 changed files with 13 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -162,3 +162,4 @@ cython_debug/
|
|||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
config.ini
|
13
app/app.py
13
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():
|
||||
|
|
2
config.sample.ini
Normal file
2
config.sample.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[BRANDING]
|
||||
instanceName = NyxAsk Sample Config
|
Loading…
Add table
Reference in a new issue