I have created session and successfully logged into session. Now I
want to write code to logout from session. I have done it with the
following code.

class signout:
        def GET(self):
                session.loggedin = False
                session.kill()
                return render.logout()

But this code is not working for me. I got the following error.

  File "/home/jinesh/PROJECT/login.py", line 41, in GET
    session.kill()
  File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/
web/session.py", line 179, in kill
    del self.store[self.session_id]
  File "/usr/local/lib/python2.7/dist-packages/web.py-0.36-py2.7.egg/
web/session.py", line 69, in __getattr__
    return getattr(self._data, name)
AttributeError: 'ThreadedDict' object has no attribute 'session_id'

Is the above code enough to logout from a session ?

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to