diff --git a/apps/crud/urls.py b/apps/crud/urls.py index d6557f2..da5c395 100644 --- a/apps/crud/urls.py +++ b/apps/crud/urls.py @@ -26,7 +26,7 @@ class CRUDRouter(DefaultRouter): ), # Detail route. Route( - url=r'^{prefix}/item{trailing_slash}$', + url=r'^{prefix}{trailing_slash}$', mapping={ 'get': 'retrieve', 'put': 'update', @@ -40,7 +40,7 @@ class CRUDRouter(DefaultRouter): # Dynamically generated detail routes. Generated using # @action(detail=True) decorator on methods of the viewset. DynamicRoute( - url=r'^{prefix}/item/{url_path}{trailing_slash}$', + url=r'^{prefix}/{url_path}{trailing_slash}$', name='{basename}-{url_name}', detail=True, initkwargs={}