<s> from django . views . generic import ListView <EOL> from django . shortcuts import redirect <EOL> from django . core . urlresolvers import reverse <EOL> from djqscsv import render_to_csv_response <EOL> from admin . metrics . models import OSFWebsiteStatistics <EOL> from admin . metrics . utils import get_osf_statistics <EOL> def update_metrics ( request ) : <EOL> get_osf_statistics ( ) <EOL> return redirect ( reverse ( '<STR_LIT>' ) ) <EOL> def download_csv ( request ) : <EOL> queryset = OSFWebsiteStatistics . objects . all ( ) . order_by ( '<STR_LIT>' ) <EOL> return render_to_csv_response ( queryset ) <EOL> class OSFStatisticsListView ( ListView ) : <EOL> model = OSFWebsiteStatistics <EOL> template_name = '<STR_LIT>' <EOL> context_object_name = '<STR_LIT>' <EOL> paginate_by = <NUM_LIT:50> <EOL> paginate_orphans = <NUM_LIT:5> <EOL> ordering = '<STR_LIT>' </s>
