articles/views.py
def list(self, request):
        """
        Show the list of articles available
        """

        articles = Article.objects.filter(is_published=True)[:10]
        serializer = ArticleListSerializer(articles, many=True)
        if serializer.data:
            return Response(serializer.data)
        else:
            return Response({}, status=404)

        Show the list of articles available
        
Show the list of articles available
Show the list of articles available
def list(self, request):
        articles = Article.objects.filter(is_published=True)[:10]
        serializer = ArticleListSerializer(articles, many=True)
        if serializer.data:
            return Response(serializer.data)
        else:
            return Response({}, status=404)
def list ( self , request ) : articles = Article . objects . filter ( is_published = True ) [ : 10 ] serializer = ArticleListSerializer ( articles , many = True ) if serializer . data : return Response ( serializer . data ) else : return Response ( { } , status = 404 )
Show the list of articles available
Show the list of articles available
"""
        Show the list of articles available
        """
self
request