In my node based app I create the following object 
session[id]=Storage(id=id) in which I store some data and menus the first 
time the index page of a site is loaded. After that session[id].node, 
session[id].navbar etc. evaluate to True and the data and menus are not set 
again. When the user edits these data and menus, the data and menus in 
session[id] should be reset.

I expected this would solve the problem:

@auth.requires_login()
def onaccept_functions(form):
    id=get_ID(auth,session)
    if session[id]:
        del session[id]

However, in case id=5 in the cms.py controller session[5] is None, whereas 
in site.py session[5]  contains data and menus:

<Storage {'node': <Row {'computedName': 'ClubWest', 'computedSubClass': 1, 
'id': 5}>, 'navbarfixedtop': False, 'hero': <Row {'url': 'nodeID5.jpg', 
'isImage': True, 'isLogo': False, 'nodeID': 5}>,...., 'homepage': True, 
'accountID': 2}> 

Why is that?

Kind regards,

Annet


-- 



Reply via email to