Ticket #4914: 4914.2.patch

File 4914.2.patch, 924 bytes (added by SmileyChris, 8 years ago)

small reword

  • docs/sessions.txt

    190190    # request.session['foo'] instead of request.session.
    191191    request.session['foo']['bar'] = 'baz'
    193 To change this default behavior, set the ``SESSION_SAVE_EVERY_REQUEST`` setting
     193To save the session explicitly, you can set ``request.session.modified`` to
     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
     200To change the default behavior of only saving to the session database when the
     201session has been modified, set the ``SESSION_SAVE_EVERY_REQUEST`` setting
    194202to ``True``. If ``SESSION_SAVE_EVERY_REQUEST`` is ``True``, Django will save
    195203the session to the database on every single request.
Back to Top