| 193 | | To change this default behavior, set the ``SESSION_SAVE_EVERY_REQUEST`` setting |
|---|
| | 193 | To save the session explicitly, you can set ``request.session.modified`` to |
|---|
| | 194 | ``True``:: |
|---|
| | 195 | |
|---|
| | 196 | # Session is not modified directly, so inform the session that it has changed. |
|---|
| | 197 | request.session['foo']['bar'] = 'baz' |
|---|
| | 198 | request.session.modified = True |
|---|
| | 199 | |
|---|
| | 200 | To change the default behavior of only saving to the session database when the |
|---|
| | 201 | session has been modified, set the ``SESSION_SAVE_EVERY_REQUEST`` setting |
|---|