Version 81 (modified by 3 years ago) ( diff ) | ,
---|
Table of Contents
S3 API Guide
This page links to all wiki pages describing how to make use of the S3 framework when developing Eden modules or other applications connecting to Eden via web services.
External links:
Authentication, Authorization, Accounting
Security / Privacy
Logging
RESTful API
API
Framework
- Implementing RESTful Controllers (s3_rest_controller)
- Extending the RESTful API by implementing S3Method
Core Classes
Configuration
Deployment Settings
Configure
A lot of configuration options are stored as key/value pairs against the tablename using:
s3db.configure(tablename, key=value)
These values can be read using:
value = s3db.get_config(tablename, "key")
These settings may have defaults defined within the core models (modules/s3db/*.py
) or default controllers (controllers/*.py
) - possibly conditional based on the values of deployment_settings or which method is being invoked.
Settings can also be customised within the customise_*_resource()
or customise_*_controller()
functions within a Template.
The value can be a simple string, a complex object or sometimes a generator function.
Example settings include:
list_fields
- which fields get displayed as columns in datatables (& currently which are read from the database for use in datalist renderers, but this should change soon as we migrate to
S3DataListLayout()
)
- which fields get displayed as columns in datatables (& currently which are read from the database for use in datalist renderers, but this should change soon as we migrate to
filter_widgets
- which S3FilterWidgets are displayed on datatable, datalist and Summary views.
report_options
orderby
- The default sort order for datatables & datalists (datalists can specify
list_orderby
if they wish this to be different from that used by datables)
- The default sort order for datatables & datalists (datalists can specify
NB If the value is a complex object, then customising this doesn't require re-storing the value as the object is edited in-place.