@addon_view
@non_atomic_requests
def usage_series(request, addon, group, start, end, format):
 date_range = check_series_params_or_404(group, start, end, format)
 check_stats_permission(request, addon)
 series = get_series((ThemeUserCount if (addon.type == amo.ADDON_PERSONA) else UpdateCount), addon=addon.id, date__range=date_range)
 if (format == 'csv'):
  return render_csv(request, addon, series, ['date', 'count'])
 elif (format == 'json'):
  return render_json(request, addon, series)

@ addon_view @ non_atomic_requests def usage_series ( request , addon , group , start , end , format ) : date_range = check_series_params_or_404 ( group , start , end , format ) check_stats_permission ( request , addon ) series = get_series ( ( ThemeUserCount if ( addon . type == amo . ADDON_PERSONA ) else UpdateCount ) , addon = addon . id , date__range = date_range ) if ( format == 'csv' ) : return render_csv ( request , addon , series , [ 'date' , 'count' ] ) elif ( format == 'json' ) : return render_json ( request , addon , series )
generate adu counts grouped by group in format .