title: django rest framework - using detail_route and detail_list
body: <p>In my code I have a viewset for the User.
  I want is to allow only Read operations (<strong>/users/42</strong> and <strong>/users/</strong>) which the ReadOnlyModelViewSet does just fine.</p>
  
  <p>In addition, I want to have a <strong>/users/register</strong> URL that I can <strong>POST</strong> to in order to register a new User.</p>
  
  <pre><code>class UserViewSet(viewsets.ReadOnlyModelViewSet):
      queryset = User.objects.all()
      serializer_class = UserSerializer
  
      @list_route(methods=['post'])
      def register(request):
          serializer = UserSerializer(data=request.DATA)
          if serializer.is_valid():
              user = User.objects.create_user(
                  username = serializer.init_data['username'],
                  password = serializer.init_data['password'],
              )
  
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          else:
              return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>Couple of questions:</p>
  
  <ul>
  <li><p>Would this be this the right way of doing that?</p></li>
  <li><p>Is there a specific <strong>signature</strong> for a method if I put it in a <strong>list_route</strong> or the <strong>detail_route</strong> decorator? because in the detail_route examples its always the same signature for the method: <strong>method_name</strong>(self, request, pk=None):</p></li>
  </ul>
  
  <p>thanks! </p>