Ticket #4914: 4914.patch
File 4914.patch, 915 bytes (added by , 17 years ago) |
---|
-
docs/sessions.txt
190 190 # request.session['foo'] instead of request.session. 191 191 request.session['foo']['bar'] = 'baz' 192 192 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, 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 194 202 to ``True``. If ``SESSION_SAVE_EVERY_REQUEST`` is ``True``, Django will save 195 203 the session to the database on every single request. 196 204