aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/route_manager.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-02-07 10:13:36 +0000
committerGravatar Gareth Coles <[email protected]>2018-02-07 10:13:36 +0000
commit7bc5e8bee74bb0a8b879a38f69748d40558a5e0b (patch)
tree2a12cbf3363fcf2989bccdf01b655f35c52f792f /pysite/route_manager.py
parentMerge pull request #1 from discord-python/feature/gunicorn-config (diff)
Static files; basic templates
Diffstat (limited to 'pysite/route_manager.py')
-rw-r--r--pysite/route_manager.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py
index e9e701e0..f61c4f65 100644
--- a/pysite/route_manager.py
+++ b/pysite/route_manager.py
@@ -16,10 +16,15 @@ DB_PORT = os.environ.get("RETHINKDB_PORT")
DB_DATABASE = os.environ.get("RETHINKDB_DATABASE")
DB_TABLE = os.environ.get("RETHINKDB_TABLE")
+TEMPLATES_PATH = "../templates"
+STATIC_PATH = "../static"
+
class RouteManager:
def __init__(self):
- self.app = Flask(__name__, template_folder="../templates")
+ self.app = Flask(
+ __name__, template_folder=TEMPLATES_PATH, static_folder=STATIC_PATH, static_url_path="/static"
+ )
self.app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY")
self.load_views()