title: Check if record exists in Django Rest Framework API LIST/DATABASE
body: <p>I want to create a viewset/apiview with a path like this: <code>list/&lt;slug:entry&gt;/</code> that once I provide the <code>entry</code> it will check if that entry exists in the database.</p>
  
  <p>*Note: on <code>list/</code> I have a path to a <code>ViewSet</code>. I wonder if I could change the id with the specific field that I want to check, so I could see if the entry exists or not, but I want to keep the id as it is, so</p>
  
  <p>I tried:</p>
  
  <pre><code>class CheckCouponAPIView(APIView):
      def get(self, request, format=None):
          try:
              Coupon.objects.get(coupon=self.kwargs.get('coupon'))
          except Coupon.DoesNotExist:
              return Response(data={'message': False})
          else:
              return Response(data={'message': True})
  </code></pre>
  
  <p>But I got an error: <code>get() got an unexpected keyword argument 'coupon'</code>.</p>
  
  <p>Here's the path: <code>path('check/&lt;slug:coupon&gt;/', CheckCouponAPIView.as_view()),</code></p>
  
  <p>Is there any good practice that I could apply in my situation?</p>