From d7fe42f224c04ce4f6ddc7851e3d3f373cc20967 Mon Sep 17 00:00:00 2001 From: David Ebbo Date: Fri, 12 Apr 2024 13:25:52 +0200 Subject: [PATCH] Move the session.connect() call to earlier --- models/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/db.py b/models/db.py index 5b0f6a2a..9f0e690a 100755 --- a/models/db.py +++ b/models/db.py @@ -124,6 +124,9 @@ from gluon.tools import Auth, Service, PluginManager +## Configure session handling: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-database +session.connect(request, response, db) + auth = Auth(db) service = Service() plugins = PluginManager() @@ -159,9 +162,6 @@ auth.settings.reset_password_requires_verification = True auth.settings.allow_basic_login = True -## Configure session handling: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-database -session.connect(request, response, db) - ##restrict site to only logged in users ## https://groups.google.com/forum/#!topic/web2py/0j92-sPp4bc ##NB: useful url to add a guest user programmatically http://stackoverflow.com/questions/35504306/web2py-how-to-programmatically-register-users/35518991