45 | | |
46 | | === Method Handlers === |
47 | | |
48 | | The default method handlers of ''shn_rest_controller()'' are implemented in models/01_crud.py: |
49 | | |
50 | | - shn_read(r, **attr) |
51 | | - shn_list(r, **attr) |
52 | | - shn_create(r, **attr) |
53 | | - shn_update(r, **attr) |
54 | | - shn_delete(r, **attr) |
55 | | - shn_search(r, **attr) |
56 | | |
57 | | where ''r'' is the respective [wiki:S3XRC_S3Request S3Request], and ''**attr'' contains all further arguments passed to shn_rest_controller(). |
58 | | |
59 | | During the [#Pre-andPost-Hooks pre-process], you can re-configure which handlers shall be used by |
60 | | |
61 | | {{{ |
62 | | r.resource.set_handler(action, handler) |
63 | | }}} |
64 | | |
65 | | where: |
66 | | |
67 | | - '''action''' is the name of the action, i.e. one of 'read', 'list', 'create', 'update', 'delete', or 'search' |
68 | | - '''handler''' is the handler function/lambda |