aboutsummaryrefslogtreecommitdiff
path: root/stackbin.py
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2022-02-15 09:52:43 -0500
committerB Stack <bgstack15@gmail.com>2022-02-15 09:59:19 -0500
commit171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5 (patch)
tree44db45d1f1878738b89a3a20b670072a740937af /stackbin.py
parentr-proxy support with /set endpoint, and extra dir (diff)
downloadstackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.tar.gz
stackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.tar.bz2
stackbin-171ec414ae74564e2c6f7a6e7da7f0ebdc9db2d5.zip
add initial system-ready values and install steps
Diffstat (limited to 'stackbin.py')
-rwxr-xr-xstackbin.py8
1 files changed, 7 insertions, 1 deletions
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()
bgstack15