Changes between Version 26 and Version 27 of RESTController
- Timestamp:
- 11/24/09 19:06:53 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v26 v27 90 90 deletable=True, 91 91 editable=True, 92 list_fields = ['id', 'opt_pr_image_type', 'image', 'title', 'description'])92 list_fields = ['id', 'opt_pr_image_type', 'image', 'title', 'description']) 93 93 }}} 94 94 … … 111 111 == Controller == 112 112 113 As usual:113 Define a controller action per resource to invoke the controller: 114 114 115 115 {{{ … … 122 122 }}} 123 123 124 New: the optional '''pheader''' argument. Thishelps you to display some information about the primary resource record in the view while operating on a component (e.g. the person's name and ID, when displaying a list of available images for this person). You may pass static content, or a function or lambda to produce content, which will be forwarded as ''pheader'' variable to the view.124 The optional '''pheader''' argument helps you to display some information about the primary resource record in the view while operating on a component (e.g. the person's name and ID, when displaying a list of available images for this person). You may pass static content, or a function or lambda to produce content, which will be forwarded as ''pheader'' variable to the view. 125 125 126 126 If you pass a function or lambda as pheader, then it has to take 5 arguments: