Small refactoring

This commit is contained in:
ITQ
2024-03-03 09:05:47 +03:00
parent 3c335f9efe
commit 8fa04faa55
4 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ from api.countries.models import Country
from api.countries.serializers import CountrySerializer
class CountryListView(ListAPIView):
class CountryListApiView(ListAPIView):
queryset = Country.objects.all().order_by("alpha2")
serializer_class = CountrySerializer
@@ -28,7 +28,7 @@ class CountryListView(ListAPIView):
return queryset
class CountryByAlpha2View(RetrieveAPIView):
class CountryByAlpha2ApiView(RetrieveAPIView):
queryset = Country.objects.all()
serializer_class = CountrySerializer
lookup_field = "alpha2"