from rest_framework.generics import ListAPIView, RetrieveAPIView
from country.models import Country
from country.api.serializers import CountrySerializer, CountryDetailWithCitySerializer


class CountryListAPIView(ListAPIView):
    queryset = Country.objects.all()
    serializer_class = CountrySerializer


class CountryDetailAPIView(RetrieveAPIView):
    queryset = Country.objects.all()
    serializer_class = CountryDetailWithCitySerializer
    lookup_url_kwarg = 'code'
    lookup_field = 'code__iexact'

5af499a1e6ce7feeb19d852e0e48aedb123a3cc1
<mask token>


class CountryDetailAPIView(RetrieveAPIView):
    queryset = Country.objects.all()
    serializer_class = CountryDetailWithCitySerializer
    lookup_url_kwarg = 'code'
    lookup_field = 'code__iexact'

<mask token>


class CountryListAPIView(ListAPIView):
    <mask token>
    <mask token>


class CountryDetailAPIView(RetrieveAPIView):
    queryset = Country.objects.all()
    serializer_class = CountryDetailWithCitySerializer
    lookup_url_kwarg = 'code'
    lookup_field = 'code__iexact'

<mask token>


class CountryListAPIView(ListAPIView):
    queryset = Country.objects.all()
    serializer_class = CountrySerializer


class CountryDetailAPIView(RetrieveAPIView):
    queryset = Country.objects.all()
    serializer_class = CountryDetailWithCitySerializer
    lookup_url_kwarg = 'code'
    lookup_field = 'code__iexact'

from rest_framework.generics import ListAPIView, RetrieveAPIView
from country.models import Country
from country.api.serializers import CountrySerializer, CountryDetailWithCitySerializer


class CountryListAPIView(ListAPIView):
    queryset = Country.objects.all()
    serializer_class = CountrySerializer


class CountryDetailAPIView(RetrieveAPIView):
    queryset = Country.objects.all()
    serializer_class = CountryDetailWithCitySerializer
    lookup_url_kwarg = 'code'
    lookup_field = 'code__iexact'
