'Session' object does not support item assignment

2007-06-16 Thread Vertigo
resh' some user sessions. Here is my faulty code (based on a refresh of all sessions, for simplicity here): from django.contrib.sessions.models import Session for session in Session.objects.all(): session['privileges'] = "foo" And this barks the following error message

Re: 'Session' object does not support item assignment

2007-06-16 Thread Jeremy Dunck
On 6/16/07, Vertigo <[EMAIL PROTECTED]> wrote: > * Are Django sessions only designed to be used through the request > context (and session middleware) ? No, but they're most convenient that way. > * Is there any "easy" snippet of code to do what I want (i.e update a > Session object out of view)

Re: 'Session' object does not support item assignment

2007-06-17 Thread Vertigo
Thanks, Jeremy. Your piece of code works perfectly. I will think about suggestions for the documentation and open a ticket. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group