From 709ee8c454f37d1ce63609521fb4acee4661a43f Mon Sep 17 00:00:00 2001 From: Sayyid Hamid Mahdavi Date: Tue, 10 Jun 2025 15:51:09 +0330 Subject: [PATCH] add application Preferences --- apps/crud/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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={}