implemented response timing via time_view
decorator
This commit is contained in:
6
views.py
6
views.py
@@ -31,6 +31,9 @@ from rest_framework.response import Response
|
||||
from rest_framework import status
|
||||
from uplim.models import Pixel, CatalogSource
|
||||
|
||||
from .utils.decorators import time_view
|
||||
from django.utils.decorators import method_decorator
|
||||
|
||||
# SANITIZE RESPONSE DATA BEFORE JSON CONVERSION FOR DEBUGGING NANS
|
||||
# now NaNs are converted to 'null' beforehand
|
||||
# ****************************************************************
|
||||
@@ -70,6 +73,7 @@ def parse_survey_param(raw):
|
||||
# **************************************************************
|
||||
|
||||
|
||||
@method_decorator(time_view, name="dispatch")
|
||||
class PixelAggregateView(APIView):
|
||||
|
||||
def get(self, request):
|
||||
@@ -132,6 +136,7 @@ class PixelAggregateView(APIView):
|
||||
# **************************************************************
|
||||
|
||||
|
||||
@method_decorator(time_view, name="dispatch")
|
||||
class UpperLimitView(APIView):
|
||||
"""
|
||||
Calculate confidence bounds based on aperture photometry using classic and bayesian methods
|
||||
@@ -538,6 +543,7 @@ class UpperLimitView(APIView):
|
||||
return Response(clean, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
@method_decorator(time_view, name="dispatch")
|
||||
class StackedUpperLimitView(APIView):
|
||||
"""
|
||||
Calculate confidence bounds based on aperture photometry using classic and bayesian methods for a set of sources
|
||||
|
Reference in New Issue
Block a user