def _csv_response(request, query_id, stream=False): query = get_object_or_404(Query, pk=query_id) query.params = url_get_params(request) return build_stream_response(query) if stream else build_download_response(query)
def view_csv_query(request, query_id): query = get_object_or_404(Query, pk=query_id) return build_stream_response(query, request)
def _csv_response(request, query_id, stream=False, delim=None): query = get_object_or_404(Query, pk=query_id) query.params = url_get_params(request) return build_stream_response( query, delim) if stream else build_download_response(query, delim)