get2(self,
option=None,
workplace=None,
cookie=None,
bias=None,
default=None,
sql_return_type=None)
| source code
|
Retrieve configuration option from backend.
@param bias: Determine the direction into which to look for config options.
'user': When no value is found for "current_user/workplace" look for a value
for "current_user" regardless of workspace. The corresponding concept is:
"Did *I* set this option anywhere on this site ? If so, reuse the value."
'workplace': When no value is found for "current_user/workplace" look for a value
for "workplace" regardless of user. The corresponding concept is:
"Did anyone set this option for *this workplace* ? If so, reuse that value."
@param default: if no value is found for the option this value is returned
instead, also the option is set to this value in the backend, if <None>
a missing option will NOT be created in the backend
@param sql_return_type: a PostgreSQL type the value of the option is to be
cast to before returning, if None no cast will be applied, you will
want to make sure that sql_return_type and type(default) are compatible
|