@addon_view
@non_atomic_requests
def usage_breakdown_series(request, addon, group, start, end, format, field):
 date_range = check_series_params_or_404(group, start, end, format)
 check_stats_permission(request, addon)
 fields = {'applications': 'apps', 'locales': 'locales', 'oses': 'os', 'versions': 'versions', 'statuses': 'status'}
 series = get_series(UpdateCount, source=fields[field], addon=addon.id, date__range=date_range)
 if (field == 'locales'):
  series = process_locales(series)
 if (format == 'csv'):
  if (field == 'applications'):
   series = flatten_applications(series)
  (series, fields) = csv_fields(series)
  return render_csv(request, addon, series, (['date', 'count'] + list(fields)))
 elif (format == 'json'):
  return render_json(request, addon, series)

@ addon_view @ non_atomic_requests def usage_breakdown_series ( request , addon , group , start , end , format , field ) : date_range = check_series_params_or_404 ( group , start , end , format ) check_stats_permission ( request , addon ) fields = { 'applications' : 'apps' , 'locales' : 'locales' , 'oses' : 'os' , 'versions' : 'versions' , 'statuses' : 'status' } series = get_series ( UpdateCount , source = fields [ field ] , addon = addon . id , date__range = date_range ) if ( field == 'locales' ) : series = process_locales ( series ) if ( format == 'csv' ) : if ( field == 'applications' ) : series = flatten_applications ( series ) ( series , fields ) = csv_fields ( series ) return render_csv ( request , addon , series , ( [ 'date' , 'count' ] + list ( fields ) ) ) elif ( format == 'json' ) : return render_json ( request , addon , series )
generate adu breakdown of field .