def json_location(model, request): def extract_title(record): return location_title( request, record.street, record.zip, record.city, record.lat, record.lon) return json_references( model, request, search_locations, LOCATION_LIMIT, extract_title=extract_title)
def json_facility(model, request): return json_references(model, request, search_facilities, FACILITY_LIMIT)
def json_occasion(model, request): return json_references(model, request, search_occasions, OCCASION_LIMIT)