Re: KeyError on access to session variable

2009-03-10 Thread nivhab
Managed to get it to work in the meanwhile. Seems like the problem is that all of a sudden I need to restart the server each time I do a change otherwise the change is not taking affect. Not sure why this is though... On Mar 10, 3:51 pm, Daniel Roseman wrote: > On Mar 10, 12:45 pm, nivhab wrote

Re: KeyError on access to session variable

2009-03-10 Thread Daniel Roseman
On Mar 10, 12:45 pm, nivhab wrote: > Hi, > > I am trying to access a simple session attribute in the following way > (this is inside a view function): > > def setSessionData(request): >         if not request.session.get('data_was_set', False): >             comLen=get_comment_count() >          

KeyError on access to session variable

2009-03-10 Thread nivhab
Hi, I am trying to access a simple session attribute in the following way (this is inside a view function): def setSessionData(request): if not request.session.get('data_was_set', False): comLen=get_comment_count() request.session['alert_count'] = comLen