title: How to add a custom action function using Django DRF viewset.Viewsets?
body: <p>I have a viewset that I created an @action decorated function.</p>
  
  <pre><code>class StoreOffersViewSet(viewsets.ViewSet):
      """Viewset for yoga stuff."""
  
      @action(detail=False, methods=['put'], name='yoga update')
          def update_yoga(self, request):
              # Get Kwargs passed
              params = self.kwargs
  </code></pre>
  
  <p>In my urls, I have:</p>
  
  <pre><code>router = DefaultRouter(trailing_slash=True)
  router.register(r'yoga', views.StoreOffersViewSet, basename='yoga')
  
  urlpatterns = router.urls
  </code></pre>
  
  <p>I would like that when a user has a PUT request to site.com/yoga, my update_yoga function is called.</p>
  
  <p>As it stands now, I get the following error:</p>
  
  <pre><code>{
      "detail": "Method \"PUT\" not allowed."
  }
  </code></pre>
  
  <p>My guess is that this is because for the default router, GET and POST already have the url style from the docs, <a href="https://www.django-rest-framework.org/api-guide/routers/#defaultrouter" rel="nofollow noreferrer">https://www.django-rest-framework.org/api-guide/routers/#defaultrouter</a>. So I am not too sure how to proceed. I am on django 3.8></p>