title: Call a particular function of Class based view Django from urls.py
body: <p>I have this views.py where I've implemented Class based views, but let's say I want to call a function <code>get_featured_products</code> when the url is <code>https://localhost:8000/featured_products</code>. What sould my urls.py look like to call the <code>get_features_products</code> function?</p>
  <pre><code>from django.shortcuts import render
  from rest_framework import views
  from rest_framework.response import Response
  from .models import * 
  from .serializers import * 
  
  # Create your views here.
  
  
  class ProductView(views.APIView):
      model= Product
      serializer = ProductSerializer
  
  
      def get(self,request):
          qs = self.model.objects.all()
          serializer = self.serializer(qs, many=True)
  
          return Response(serializer.data)
  
      
      def post(self,request):
          serializer = self.serializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
  
          return Response(serializer.error_messages())
  
  
      def put(self,request,pk):
          product = Product.objects.get(id=pk)
          serializer = self.serializer(instance=product, data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
          return Response(serializer.error_messages)
  
     def get_featured_products(self,request):
          #some code here
          return None
  </code></pre>
  <p>How should I refer to <code>get_featured_products</code> in my <code>urls.py</code></p>