Start config work

This commit is contained in:
Nyx 2025-03-10 01:25:36 -05:00
parent 4a6ef8a047
commit a071556e1f
3 changed files with 13 additions and 3 deletions

1
.gitignore vendored
View file

@ -162,3 +162,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
config.ini

View file

@ -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
View file

@ -0,0 +1,2 @@
[BRANDING]
instanceName = NyxAsk Sample Config