Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update Rules
authored
Jun 30, 2022
by
Christoph Deneke
Show whitespace changes
Inline
Side-by-side
Rules.md
View page @
69f67b9f
...
...
@@ -74,3 +74,14 @@ The create and update functions for the database entries in database_transaction
**There should be no direct commits by db.session.commit().**
Some times the db_model_object is created and just passed to the function. We might want to change this.
### Working with the session cookie
To avoid confusion with the database session, the session cookie from flask is importat as
`login_session`
and should be addressed like this
~~~~
from flask import session as login_session
login_session.clear()
login_session["user_id"] = fuser.id
~~~~