#NEWLINE# @ non_atomic_requests #NEWLINE# def collection_series( request , username , slug , format , group , start , end , field ) : #NEWLINE# #INDENT# 'Pull a single field from the collection_query data' #NEWLINE# ( start , end ) = get_daterange_or_404 ( start , end ) #NEWLINE# group = ( 'date' if ( group == 'day' ) else group ) #NEWLINE# series = [ ] #NEWLINE# c = get_collection ( request , username , slug ) #NEWLINE# full_series = _collection_query ( request , c , start , end ) #NEWLINE# for row in full_series : #NEWLINE# #INDENT# if ( field in row [ 'data' ] ) : #NEWLINE# #INDENT# series . append ( { #NEWLINE# #INDENT# 'date' : row [ 'date' ] , #NEWLINE# 'count' : row [ 'data' ] [ field ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# return render_json ( request , None , series )