figures/views.py
def list(self, request):
        """
        Returns site metrics data for current month

        TODO: NEXT Add query params to get data from previous months
        TODO: Add paginagation
        """
        site = django.contrib.sites.shortcuts.get_current_site(request)
        course_keys = figures.sites.get_course_keys_for_site(site)
        date_for = datetime.utcnow().date()
        month_for = '{}/{}'.format(date_for.month, date_for.year)
        data = []
        for course_key in course_keys:
            data.append(metrics.get_month_course_metrics(site=site,
                                                         course_id=str(course_key),
                                                         month_for=month_for))
        return Response(data)

        Returns site metrics data for current month

        TODO: NEXT Add query params to get data from previous months
        TODO: Add paginagation
        
Returns site metrics data for current month
TODO: NEXT Add query params to get data from previous months
TODO: Add paginagation
Returns site metrics data for current month TODO : NEXT Add query params to get data from previous months TODO : Add paginagation
def list(self, request):
        site = django.contrib.sites.shortcuts.get_current_site(request)
        course_keys = figures.sites.get_course_keys_for_site(site)
        date_for = datetime.utcnow().date()
        month_for = '{}/{}'.format(date_for.month, date_for.year)
        data = []
        for course_key in course_keys:
            data.append(metrics.get_month_course_metrics(site=site,
                                                         course_id=str(course_key),
                                                         month_for=month_for))
        return Response(data)
def list ( self , request ) : site = django . contrib . sites . shortcuts . get_current_site ( request ) course_keys = figures . sites . get_course_keys_for_site ( site ) date_for = datetime . utcnow ( ) . date ( ) month_for = '{}/{}' . format ( date_for . month , date_for . year ) data = [ ] for course_key in course_keys : data . append ( metrics . get_month_course_metrics ( site = site , course_id = str ( course_key ) , month_for = month_for ) ) return Response ( data )
Returns site metrics data for current month
TODO: NEXT Add query params to get data from previous months
TODO: Add paginagation
Returns site metrics data for current month TODO : NEXT Add query params to get data from previous months TODO : Add paginagation
"""
        Returns site metrics data for current month

        TODO: NEXT Add query params to get data from previous months
        TODO: Add paginagation
        """
self
request