Django-rest-framework @detail_route for specific url
<p>I'm using <code>Django-rest-framework==3.3.2</code> and <code>Django==1.8.8</code>. I have a simple <code>GenericView</code></p>

<pre><code>from rest_framework import generics
from rest_framework.decorators import detail_route

class MyApiView(generics.RetrieveAPIView):
    serializer = MySerializer
    def get(self, *args, **kwargs):
        super(MyApiView, self).get(*args, **kwargs)

    @detail_route(methods=['post'])
    def custom_action(self, request)
        # do something important
        return Response()
</code></pre>

<p>This works fine if I use the <code>router</code> that django-rest-framework offers, however I'm creating all my urls manually and would like to do the same with the <code>detail_route</code>. </p>

<p>I wonder if it's possible for me to do something like this:</p>

<pre><code>from django.conf.urls import patterns, url
from myapi import views
urlpatterns = patterns(
    '',
    url(r'^my-api/$', views.MyApiView.as_view()),
    url(r'^my-api/action$', views.MyApiView.custom_action.as_view()),
</code></pre>

<p>)</p>

<p>Of course this second url doesn't work. It's just an example of what I would like to do.</p>

<p>Thanks in advance.</p>