GaiaDBInterface/views.py
2024-09-17 13:07:22 +03:00

15 lines
443 B
Python

from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .models import GaiaSource
from .serializers import GaiaSourceSerializer
class ConeSearchView(APIView):
def get(self, request, ra, dec, radius):
radius = float(radius)
ra = radians(float(ra))
dec = radians(float(dec))
objects = GaiaSource.objects.all()
result = []