|
|
|
|
|
|
|
mandatory(self)
Mandatory objects defined by this model, regardless whether enabled
or disabled |
source code
|
|
|
model(self)
Defines all tables in this model, to be implemented by subclasses |
source code
|
|
|
defaults(self)
Definitions of model globals (response.s3.*) if the model has been
disabled in deployment settings, to be implemented by subclasses |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
table(cls,
tablename,
default=None,
db_only=False)
Helper function to load a table definition by its name |
source code
|
|
|
get(cls,
name,
default=None)
Helper function to load a response.s3 variable from models |
source code
|
|
|
load(cls,
name)
Helper function to load a model by its name (=prefix) |
source code
|
|
|
|
|
|
|
|
|
|
|
add_custom_callback(cls,
tablename,
hook,
cb,
method=None)
Generic method to append a custom onvalidation|onaccept
callback to the originally configured callback chain,
for use in customise_* in templates |
source code
|
|
|
|
|
onaccept(cls,
table,
record,
method="create")
Helper to run the onvalidation routine for a record |
source code
|
|
|
|
|
|
|
add_dynamic_components(cls,
tablename,
exclude=None)
Helper function to look up and declare dynamic components for a
table; called by get_components if dynamic_components is configured
for the table |
source code
|
|
|
|
|
|
|
parse_hook(cls,
table,
alias,
hook=None)
Parse a component configuration, loading all necessary table models
and applying defaults |
source code
|
|
|
get_hooks(cls,
table,
names=None)
Find applicable component configurations (hooks) for a table |
source code
|
|
|
|
|
|
|
hierarchy_link(cls,
tablename)
Get the alias of the component that represents the parent node in a
hierarchy (for link-table based hierarchies) |
source code
|
|
|
set_method(cls,
prefix,
name,
component_name=None,
method=None,
action=None)
Adds a custom method for a resource or component |
source code
|
|
|
get_method(cls,
prefix,
name,
component_name=None,
method=None)
Retrieves a custom method for a resource or component |
source code
|
|
|
|
|
|
|
super_link(cls,
name,
supertable,
label=None,
comment=None,
represent=None,
orderby=None,
sort=True,
filterby=None,
filter_opts=None,
not_filterby=None,
not_filter_opts=None,
instance_types=None,
realms=None,
updateable=False,
groupby=None,
script=None,
widget=None,
empty=True,
default=DEFAULT,
ondelete="CASCADE",
readable=False,
writable=False)
Get a foreign key field for a super-entity |
source code
|
|
|
|
|
|
|
|
|
|