The current Object
The current object holds thread-local global variables. It can be imported into any context:
from gluon import current
Attribute |
Type |
Explanation |
---|---|---|
current.db |
DAL |
the database |
DataModel |
the model loader |
|
current.deployment_settings |
S3Config |
deployment settings |
AuthS3 |
global authentication/authorisation service |
|
GIS |
global GIS service |
|
S3Msg |
global messaging service |
|
S3XML |
global XML decoder/encoder service |
|
current.request |
Request |
web2py’s global request object |
current.response |
Response |
web2py’s global response object |
current.T |
TranslatorFactory |
String Translator (for i18n) |
current.messages |
Messages |
Common labels (internationalised) |
current.ERROR |
Messages |
Common error messages (internationalised) |