title: Django rest framework pk default validation
body: <p>In Django Rest Framework, if I have a retrieve view (or a detail_route or any other route that is meant to operate on a single item rather than a collection) then I have to have an argument called <code>pk</code> for the primary key or ID to be passed in.</p>
  
  <p>For example:</p>
  
  <pre><code>def retrieve(self, request, pk=None):
       ...
       return Response(data={'id': pk})
  </code></pre>
  
  <p>My question is what kind of validation (if any) is applied to pulling the PK from the URL? Also, is there an idiomatic way to validate it, rather than writing it inline in the view itself?</p>
  
  <p>I have tried looking in the docs but so far haven't seen this covered.</p>