Changes between Version 8 and Version 9 of S3/S3REST/s3_rest_controller


Ignore:
Timestamp:
10/22/10 12:26:42 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3REST/s3_rest_controller

    v8 v9  
    2323  - '''prefix''' is the application prefix of the resource
    2424  - '''resourcename''' is the name of the resource (without prefix)
    25   - '''**attr''' are any additional view components
     25  - '''**attr''' are any additional view variables
    2626
    2727  - '''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 view
     28    - in interactive view formats, this is a {{{dict}}} view variables
    2929
    30 === Additional View Components ===
     30=== Additional View Variables ===
    3131
    32 Additional named arguments in the {{{s3_rest_controller}}} call control the {{{output dict}}} ''after'' the request has been executed:
     32In interactive view formats, any additional named arguments in the {{{s3_rest_controller}}} argument list will be added to the view variables:
    3333
    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}}} instead
    35   - any non-callable argument which is not {{{None}}} will be added to the {{{output dict}}} as-is
    36   - 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
    3737
    3838A typical use-case is '''rheader''':
     
    4949}}}
    5050
    51 In this case, the {{{rheader}}} variable is only added to the output when {{{my_rheader(r)}}} returns something else than {{{None}}}.
     51If {{{my_rheader(r)}}} gives something else than {{{None}}}, then this value is added as {{{rheader}}} to the view variables.
    5252
    5353----