Changes between Version 4 and Version 5 of S3/DynamicTables


Ignore:
Timestamp:
02/21/17 10:25:38 (8 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/DynamicTables

    v4 v5  
    126126
    127127{{{#!python
    128 def example():
    129     """ REST Controller for the s3dt_example dynamic table """
     128def dynamic():
     129    """ REST Controller for dynamic tables """
    130130
    131     return s3_rest_controller(dynamic = "example")
     131    args = request.args
     132    if len(args):
     133        # Remember that the first argument can have a format-extension!
     134        return s3_rest_controller(dynamic = args[0].rsplit(".", 1)[0])
     135    else:
     136        raise HTTP(400, "No resource specified")
    132137}}}
    133 
    134138== Dynamic Components ==
    135139