Changes between Version 74 and Version 75 of RESTController


Ignore:
Timestamp:
03/05/13 09:26:41 (12 years ago)
Author:
Fran Boon
Comment:

updates to current code

Legend:

Unmodified
Added
Removed
Modified
  • RESTController

    v74 v75  
    7070 * Multiple record select: http://localhost:8000/eden/pr/person?person.uid=12345678-9012-3456-7890,65434567-8901-2345-67890123
    7171 * Filter by characteristic: http://localhost:8000/eden/pr/person?person.gender=male
     72
    7273== Model ==
    73 
    7474Example for definition of a component table in the model:
    7575
     
    152152    if len(request.args) == 2:
    153153        crud.settings.update_next = URL(f="kit_item", args=request.args[1])
    154     return shn_rest_controller(module, "kit", main="code", onaccept=lambda form: kit_total(form))
     154    return s3_rest_controller(module, "kit", main="code", onaccept=lambda form: kit_total(form))
    155155}}}
    156156
     
    179179{{{
    180180# Plug into REST controller
    181 s3mgr.model.set_method(module, "person", method="search_simple", action=shn_pr_person_search_simple )
     181s3db.set_method(module, "person", method="search_simple", action=shn_pr_person_search_simple )
    182182}}}
    183183
     
    195195    person = db(db.pr_person.uuid == auth.user.person_uuid).select(db.pr_person.id)                                             
    196196    response.s3.filter = (db.msg_inbox.person_id == person[0].id)                                                             
    197     s3mgr.model.set_method(module, "inbox", method="create", action = restricted_method)                                     
     197    s3db.set_method(module, "inbox", method="create", action = restricted_method)                                     
    198198    return s3_rest_controller(module, "inbox", listadd=False, editable = False) 
    199199
     
    211211
    212212  * '''r''' = an instance of ''S3RESTRequest'' containing all data about the request
    213   * '''**attr''' = a dictionary of named arguments (same named args as passed to the shn_rest_controller)
     213  * '''**attr''' = a dictionary of named arguments (same named args as passed to the s3_rest_controller)
    214214
    215215----