Changes between Version 26 and Version 27 of S3REST


Ignore:
Timestamp:
05/14/10 06:59:09 (12 years ago)
Author:
Fran Boon
Comment:

Update for new nomenclature

Legend:

Unmodified
Added
Removed
Modified
  • S3REST

    v26 v27  
    1414s3rest is an instance of the RESTController class, implemented in modules/s3rest.py.
    1515
    16 Instead of the web2py ''request'' object, s3rest uses the ''XRequest'' class (described below) to represent the current REST request. Other than web2py/request, the XRequest of the current call is not a global object, but gets passed as argument when calling REST method handlers.
     16Instead of the web2py ''request'' object, s3rest uses the ''S3Request'' class (described below) to represent the current REST request. Other than web2py/request, the XRequest of the current call is not a global object, but gets passed as argument when calling REST method handlers.
    1717
    1818=== REST Methods ===
     
    4040=== CRUD Method Handlers ===
    4141
    42 The default method handlers for each of CRUD+S are implemented in models/01_RESTlike_controller.py:
     42The default method handlers for each of CRUD+S are implemented in models/01_crud.py:
    4343
    4444  - shn_read(jr, **attr)
     
    5252  - import_json(jr, **attr)
    5353
    54 where ''jr'' is the current ''XRequest'', and ''**attr'' contains all further arguments passed to the REST controller.
     54where ''jr'' is the current ''S3Request'', and ''**attr'' contains all further arguments passed to the REST controller.
    5555
    5656You can override these defaults at any time by
     
    7676  - '''action''' is the method handler function/lambda
    7777
    78 The ''action'' method has to take the same arguments as the default handlers: ''jr'' (XRequest) and ''**attr''.
    79 == XRequest ==
     78The ''action'' method has to take the same arguments as the default handlers: ''jr'' (S3Request) and ''**attr''.
     79== S3Request ==
    8080
    81 Important: XRequest instances are generated per request and must not be stored or referenced by static or global objects to avoid memory leaks!
    82 === Attributes of the XRequest ===
     81Important: S3Request instances are generated per request and must not be stored or referenced by static or global objects to avoid memory leaks!
     82=== Attributes of the S3Request ===
    8383
    84 The following attributes are set during initialisation of an XRequest object, no further call is required.
     84The following attributes are set during initialisation of an S3Request object, no further call is required.
    8585
    8686==== Controller Attributes ====
     
    133133  - methods: '''set_attr()''' and '''get_attr()'''
    134134
    135 === Methods of the XRequest ===
     135=== Methods of the S3Request ===
    136136
    137137'''here(representation=None)'''