I have two apps running on production: "init" app, and "panel" app.
Both of them are using the same database (symlinked models and databases folder).
The sessions are stored in the db.
The main app is "init", so I'm connecting to session like this:
session.connect(request, response, db=db, masterapp='init')
In the database, I can see that the session table is called "web2py_session_init".
Now I need to rename both apps and serve both of them on domaind and subdomain, so I did this:
- renamed "init" to "
website"; the app is now served on
website.com domain.
- renamed "panel" to "
website_panel"; the app is now served on
panel.website.com domain
The main app now is "website_panel".
In order to mantain sessions through main domain and subdomain, I added this sentence after the session.connect, so I ended up with this:
session.connect(request, response, db=db, masterapp='init')
response.cookies[response.session_id_name]['domain'] = 'website.com'
But I'm receiving this error:
First thing I tryied was to change masterapp parameter value, like this:
session.connect(request, response, db=db, masterapp='website_panel')
response.cookies[response.session_id_name]['domain'] = 'website.com'
but in this case, an error is raised saying that the table "web2py_session_website_panel" doesn't exists.
I'm not shure why web2py doesn't create the table. I have migrations enabled,
I also tryied manually renaming the table and the corresponding file under databases folder, but in this case I receive the following error:
Also tryied deleting the old session table and the corresponding file under databases folder, but in this case again I receive an error saying that the table "web2py_session_website_panel" doesn't exists. So I'm stucked here. Any tip? Thanks in advance.