Changes between Version 8 and Version 9 of S3/S3REST/s3_rest_controller
- Timestamp:
- 10/22/10 12:26:42 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3REST/s3_rest_controller
v8 v9 23 23 - '''prefix''' is the application prefix of the resource 24 24 - '''resourcename''' is the name of the resource (without prefix) 25 - '''**attr''' are any additional view components25 - '''**attr''' are any additional view variables 26 26 27 27 - '''output''' contains the result of the request and can be returned from the controller as-is 28 - in interactive view formats, this is a {{{dict}}} of variables for the view28 - in interactive view formats, this is a {{{dict}}} view variables 29 29 30 === Additional View Components ===30 === Additional View Variables === 31 31 32 Additional named arguments in the {{{s3_rest_controller}}} call control the {{{output dict}}} ''after'' the request has been executed:32 In interactive view formats, any additional named arguments in the {{{s3_rest_controller}}} argument list will be added to the view variables: 33 33 34 - any callable argument will be invoked with the {{{S3Request}}} as first and only argument, and its return value will be added to the {{{output dict}}} instead35 - any non-callable argument w hich is not {{{None}}} will be added to the {{{output dict}}}as-is36 - any argument that gives {{{None}}} will remove this key from the {{{output dict}}}34 - any callable argument will be invoked with the {{{S3Request}}} as first and only argument, and its return value will be added to the view variables 35 - any non-callable argument will be added to the view variables as-is 36 - any argument that gives {{{None}}} will remove this key from the view variables 37 37 38 38 A typical use-case is '''rheader''': … … 49 49 }}} 50 50 51 I n this case, the {{{rheader}}} variable is only added to the output when {{{my_rheader(r)}}} returns something else than {{{None}}}.51 If {{{my_rheader(r)}}} gives something else than {{{None}}}, then this value is added as {{{rheader}}} to the view variables. 52 52 53 53 ----