aboutsummaryrefslogtreecommitdiff
path: root/stackbin.py
diff options
context:
space:
mode:
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