From 171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 15 Feb 2022 09:52:43 -0500 Subject: add initial system-ready values and install steps --- stackbin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'stackbin.py') diff --git a/stackbin.py b/stackbin.py index e8948fd..1b08b43 100755 --- a/stackbin.py +++ b/stackbin.py @@ -1,6 +1,8 @@ # File: stackbin.py # SPDX-License-Identifier: GPL-3.0 # Authors: mitsuhiko, su27, bgstack15 +# Reference: +# fuss.py from datetime import datetime, timedelta from itsdangerous import Signer from flask import (Flask, request, url_for, redirect, g, render_template, session, abort) @@ -50,8 +52,12 @@ def get_unsigned(string, salt="blank"): return Signer(app.secret_key, salt=salt).unsign(str(string)).decode("utf-8") app = Flask(__name__) -app.config.from_pyfile('config.cfg') +app.config.from_pyfile('stackbin.conf') db = SQLAlchemy(app) +if "STATIC_FOLDER" in app.config: + app.static_folder=app.config["STATIC_FOLDER"] +if "TEMPLATE_FOLDER" in app.config: + app.template_folder=app.config["TEMPLATE_FOLDER"] def url_for_other_page(page): args = request.view_args.copy() -- cgit