def movement_origins(): origin = request.params.get('origin', None) return { 'products': list(TransportEntry.UniqueNamesForOrigin( app.factory(), origin=origin)) }
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)
def movement_origins(): return { 'origins': list(TransportEntry.UniqueOrigins(app.factory())) }