Changes between Version 66 and Version 67 of S3/S3REST/s3_rest_controller


Ignore:
Timestamp:
05/03/11 09:13:06 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3REST/s3_rest_controller

    v66 v67  
    4646
    4747{{{
    48 s3xrc.model.configure(table, key=value)
     48s3xrc.configure(table, key=value)
    4949}}}
    5050
     
    7474
    7575{{{
    76   s3xrc.model.configure(table, editable=True,             # Records can be updated
    77                                insertable=True,           # New records can be added
    78                                deletable=True,            # Records can be deleted
    79                                listadd=True)              # to have a add-record form in list view
     76  s3xrc.configure(table, editable=True,             # Records can be updated
     77                         insertable=True,           # New records can be added
     78                         deletable=True,            # Records can be deleted
     79                         listadd=True)              # to have a add-record form in list view
    8080}}}
    8181
     
    9494
    9595{{{
    96 s3xrc.model.configure(table,
    97                       list_fields=["id", "name", "location_id"])
     96s3xrc.configure(table,
     97                list_fields=["id", "name", "location_id"])
    9898}}}
    9999
     
    103103
    104104{{{
    105 s3xrc.model.configure(table,
    106                       list_fields=[
    107                           "id",
    108                           "name",
    109                           "location_id",
    110                           (T("Total costs"), "total_costs")
    111                       ]
     105s3xrc.configure(table,
     106                list_fields=["id",
     107                             "name",
     108                             "location_id",
     109                             (T("Total costs"), "total_costs")]
    112110}}}
    113111
     
    117115
    118116{{{
    119 s3xrc.model.configure(table,
    120                       list_fields=[
    121                           "id",
    122                           "name",
    123                           "location_id$lat",
    124                           "location_id$lon"
    125                       ]
     117s3xrc.configure(table,
     118                list_fields=["id",
     119                             "name",
     120                             "location_id$lat",
     121                             "location_id$lon"]
    126122}}}
    127123
     
    132128If the resource is set to {{{insertable=False}}} or if the user is not permitted to create records in this table, no "Add Record"-button will be available.
    133129
    134   NOTE: ''If for some reason the default embedded create-form is not desired, you can set {{{s3xrc.model.configure(table, listadd=False, addbtn=True)}}}, which will render the "Add Record"-button as link to the create method instead.''
     130  NOTE: ''If for some reason the default embedded create-form is not desired, you can set {{{s3xrc.configure(table, listadd=False, addbtn=True)}}}, which will render the "Add Record"-button as link to the create method instead.''
    135131=== Redirection ===
    136132
     
    140136
    141137{{{
    142 s3xrc.model.configure(table, create_next=url)
    143 }}}
    144 {{{
    145 s3xrc.model.configure(table, update_next=url)
    146 }}}
    147 {{{
    148 s3xrc.model.configure(table, delete_next=url)
     138s3xrc.configure(table, create_next=url)
     139}}}
     140{{{
     141s3xrc.configure(table, update_next=url)
     142}}}
     143{{{
     144s3xrc.configure(table, delete_next=url)
    149145}}}
    150146
     
    175171
    176172{{{
    177 s3xrc.model.configure(table, create_onvalidation=callback)
    178 }}}
    179 {{{
    180 s3xrc.model.configure(table, update_onvalidation=callback)
     173s3xrc.configure(table, create_onvalidation=callback)
     174}}}
     175{{{
     176s3xrc.configure(table, update_onvalidation=callback)
    181177}}}
    182178
     
    189185
    190186{{{
    191 s3xrc.model.configure(table, onvalidation=callback)
     187s3xrc.configure(table, onvalidation=callback)
    192188}}}
    193189
     
    215211
    216212{{{
    217 s3xrc.model.configure(table, create_onaccept=callback)
    218 }}}
    219 {{{
    220 s3xrc.model.configure(table, update_onaccept=callback)
     213s3xrc.configure(table, create_onaccept=callback)
     214}}}
     215{{{
     216s3xrc.configure(table, update_onaccept=callback)
    221217}}}
    222218
     
    229225
    230226{{{
    231 s3xrc.model.configure(table, onaccept=callback)
     227s3xrc.configure(table, onaccept=callback)
    232228}}}
    233229
     
    241237
    242238{{{
    243 s3xrc.model.configure(table, ondelete=callback)
     239s3xrc.configure(table, ondelete=callback)
    244240}}}
    245241