Changes between Version 6 and Version 7 of NewbieMistakes
- Timestamp:
- Oct 4, 2005, 10:38:54 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewbieMistakes
v6 v7 45 45 46 46 current_zip = meta.IntegerField(maxlength=5,null=True,blank=True) 47 48 49 == Appending to a list in session doesn't work == 50 51 ==== Problem ==== 52 53 If you have a list in your session, append operations don't get saved to the object. 54 55 ==== Solution ==== 56 57 Copy the list out of the session object, append to it, then copy it back in: 58 59 {{{ 60 sessionlist = request.session['my_list'] 61 sessionlist.append(new_object) 62 request.session['my_list'] = sessionlist