session in webpy - getting username in all classes
问题 I am using webpy framework for my project. I am logging in from my 'login' class of main.py program. I want to get the username in some other class. I tried with session and experimented with it for a long time. I have implemented session like below. store = web.session.DiskStore('sessions') session = web.session.Session(app,store,initializer={'login': 0,'privilege': 0}) in my login class of main.py the following code will work when user submit username and password.(This is the post method