hello ; i put my module in application/modules folder. i assumed that session, request is global, but referencing session and request cause undefined name error. currently i pass these as parameters, so far it works as i expected.
But teach me how to make global environment available to my module. I tried, in models/db.py who = mymodules.Who(globals()) in mymodule class Who(object): def __init__(self,environment): #,session,request): self.environment = environment request = environment['request'] session = environment['session'] .... ..... def login(......) request = environment['request'] session = environment['session'] .... __init__ works OK but when i call login, i get error as Traceback (most recent call last): File "/Users/kawateyutaka/project3/web2py/gluon/main.py", line 477, in wsgibase session._try_store_on_disk(request, response) File "/Users/kawateyutaka/project3/web2py/gluon/globals.py", line 401, in _try_store_on_disk cPickle.dump(dict(self), response.session_file) TypeError: expected string or Unicode object, NoneType found