Module module_template
Template for module writers.
Short description goes here.
initiate (result) |
(Required): Initiate function
Modules have access to the following instance variables:
self.org (the org the module was called in),
self.initiator (the user that callced the module),
self.id (the process id of the module instance) |
data |
(Required) Data for module
Variables that module uses during the course of a process. |
config |
(Required): Config for module
Defines the input parameters to the module initiate function. |
-
initiate (result)
-
(Required): Initiate function
Modules have access to the following instance variables:
self.org
(the org the module was called in),
self.initiator
(the user that callced the module),
self.id
(the process id of the module instance)
Parameters:
- result
(optional) Callback if this module is embedded in other modules
-
data
-
(Required) Data for module
Variables that module uses during the course of a process.
Can be blank
-
config
-
(Required): Config for module
Defines the input parameters to the module initiate function.
Can be blank
When calling a module from within another module,
variables not defined in config will be ignored.
Default values set in config can be overridden
Fields:
- field_1
ex: votes_required, default = 5
- field_2
ex: voting_type, default = "majority"
-
modpol.modules.module_template
-
(Required) Add to module table