Changes between Version 50 and Version 51 of NewbieMistakes


Ignore:
Timestamp:
05/17/13 12:47:24 (22 months ago)
Author:
John Borwick <john_borwick@…>
Comment:

In-place appending works OK if you tell Django the session was modified

Legend:

Unmodified
Added
Removed
Modified
  • NewbieMistakes

    v50 v51  
    107107sessionlist.append(new_object)
    108108request.session['my_list'] = sessionlist
     109}}}
     110
     111Alternatively, explictly mark the session as modified:
     112
     113{{{
     114request.session['my_list'].append(new_object)
     115request.session.modified = True
    109116}}}
    110117
Back to Top