aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--apioforum/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/apioforum/__init__.py b/apioforum/__init__.py
index 087df81..037afd7 100644
--- a/apioforum/__init__.py
+++ b/apioforum/__init__.py
@@ -1,7 +1,7 @@
# boilerplate boilerplate boilerplate
# yay
-from flask import Flask, request
+from flask import Flask, request, session
from .db import get_db
import os
@@ -65,6 +65,10 @@ def create_app():
def md_render(s):
return render(s)
+ @app.before_request
+ def permanent_session():
+ session.permanent = True
+
app.add_url_rule("/",endpoint="index")
return app