@non_atomic_requests
def site_series(request, format, group, start, end, field):
 (start, end) = get_daterange_or_404(start, end)
 group = ('date' if (group == 'day') else group)
 series = []
 (full_series, keys) = _site_query(group, start, end, field, request)
 for row in full_series:
  if (field in row['data']):
   series.append({'date': row['date'], 'count': row['data'][field], 'data': {}})
 if (format == 'csv'):
  (series, fields) = csv_fields(series)
  return render_csv(request, None, series, (['date', 'count'] + list(fields)), title=('%s week Site Statistics' % settings.DOMAIN), show_disclaimer=True)
 return render_json(request, None, series)

@ non_atomic_requests def site_series ( request , format , group , start , end , field ) : ( start , end ) = get_daterange_or_404 ( start , end ) group = ( 'date' if ( group == 'day' ) else group ) series = [ ] ( full_series , keys ) = _site_query ( group , start , end , field , request ) for row in full_series : if ( field in row [ 'data' ] ) : series . append ( { 'date' : row [ 'date' ] , 'count' : row [ 'data' ] [ field ] , 'data' : { } } ) if ( format == 'csv' ) : ( series , fields ) = csv_fields ( series ) return render_csv ( request , None , series , ( [ 'date' , 'count' ] + list ( fields ) ) , title = ( '%s week Site Statistics' % settings . DOMAIN ) , show_disclaimer = True ) return render_json ( request , None , series )
pull a single field from the site_query data .