Example #1
0
def movement_origins():
    origin = request.params.get('origin', None)
    return {
        'products':
            list(TransportEntry.UniqueNamesForOrigin(
                        app.factory(),
                        origin=origin))
        }
Example #2
0
 def response_generator():
     for entry in TransportEntry.LocationBasedExport(
                     session=app.factory(),
                     origin=origin,
                     product=product,
                     type=type,
                     start=date_start,
                     end=date_end):
         yield '%s\n' % dumps(entry.dict)
Example #3
0
def movement_origins():
    return {
        'origins': list(TransportEntry.UniqueOrigins(app.factory()))
    }