Hi all,

Is there a simple way to access the dynamic web2py global variables
(db, session, request, response) from inside a user defined class?

If I were to define the class inside the controller, then I'd have no
trouble. However, if I define the class in a separate module (i.e. in
the "modules" subdirectory) then I'm not able to access these globals
anymore from inside the class.

All I've been able to find so far is passing the global variables as
arguments to the constructor/methods, but this seems inelegant to me
since db, request, etc. are _global_ variables. Accessing them is kind
of like accessing logging or any other Singleton...


Thanks in advance,

--Jonathan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to