#NEWLINE# @ addon_view_with_unlisted #NEWLINE# @ non_atomic_requests #NEWLINE# def usage_series( request , addon , group , start , end , format ) : #NEWLINE# #INDENT# 'Generate ADU counts grouped by ``group`` in ``format``.' #NEWLINE# date_range = check_series_params_or_404 ( group , start , end , format ) #NEWLINE# check_stats_permission ( request , addon ) #NEWLINE# series = get_series ( ( ThemeUserCount if ( addon . type == amo . ADDON_PERSONA ) else UpdateCount ) , addon = addon . id , date__range = date_range ) #NEWLINE# if ( format == 'csv' ) : #NEWLINE# #INDENT# return render_csv ( request , addon , series , [ 'date' , 'count' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( format == 'json' ) : #NEWLINE# #INDENT# return render_json ( series , addon , series )