The Application class is a global Draco object that provides
functionality for application variables and locking. Application variables
are variables that are shared among all handlers and templates in the web
application. They persist until the web server stops or restarts. The
global instance of the Application class is stored under the name
application
in the current module.
Application variables depend on database access and are not available when
there is no database access. You can check if application variables are
available by testing the application
instance for non-zeroness.
The Application object is a namespace. Use Python's dictionary notation to get, set or remove application variables from the Application object. A small example:
from draco.application import application application['ham'] = 'spam' del application['ham']
) |
The public methods of Application are:
scope) |
'__system__'
.
) |
) |