Changes between Version 22 and Version 23 of BluePrintREST


Ignore:
Timestamp:
12/31/08 19:14:09 (16 years ago)
Author:
Fran Boon
Comment:

+Benefits & reworked Downsides

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintREST

    v22 v23  
    3535/sahana/gis/feature/id?method=delete
    3636}}}
     37NB T3 requires ID to be the last argument, so don't want URLs like: /id/create
    3738
    38 However, is there much benefit in this?[[BR]]
     39There are benefits:
     40 * Simplified ability to create .represent widgets:
     41{{{
     42def shn_list_item(table,action,display='table.name',extra=None):
     43    if extra:
     44        items=DIV(TR(TD(A(eval(display),_href=t2.action(action,table.id))),TD(extra)))
     45    else:
     46        items=DIV(A(eval(display),_href=t2.action(action,table.id)))
     47    return DIV(*items)
     48}}}
     49
    3950There are downsides:
    40  * We need to be authenticated for all actions (unless we patch T2)
    41  * Controller functions are less readable, with more levels of indent.
    42 NB T3 requires ID to be the last argument, so don't want URLs like: /id/create
     51 * Controller functions are more complex:
     52  * Need lots of extra indentation
     53   * if method=='':
     54   * if t2.logged_in:
    4355
    4456We want to extend this to export raw data in other formats, e.g. using the optional vars: