diff options
| author | tanwanirahul | 2014-12-19 20:16:46 +0530 | 
|---|---|---|
| committer | tanwanirahul | 2014-12-19 20:16:46 +0530 | 
| commit | a8a3fedb5c52cc62c6ecf59c4138e9a6ecf04806 (patch) | |
| tree | e67ee3a905c1f9c4d6b5f9c3451be2125bbdb7a4 /docs/tutorial/6-viewsets-and-routers.md | |
| parent | 2448cc8e856369ca6fb99b848e10f8ff0105e925 (diff) | |
| download | django-rest-framework-a8a3fedb5c52cc62c6ecf59c4138e9a6ecf04806.tar.bz2 | |
Add url_path documention for detail_route decorator
Diffstat (limited to 'docs/tutorial/6-viewsets-and-routers.md')
| -rw-r--r-- | docs/tutorial/6-viewsets-and-routers.md | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/docs/tutorial/6-viewsets-and-routers.md b/docs/tutorial/6-viewsets-and-routers.md index cf37a260..8e4e22f0 100644 --- a/docs/tutorial/6-viewsets-and-routers.md +++ b/docs/tutorial/6-viewsets-and-routers.md @@ -53,6 +53,8 @@ Notice that we've also used the `@detail_route` decorator to create a custom act  Custom actions which use the `@detail_route` decorator will respond to `GET` requests.  We can use the `methods` argument if we wanted an action that responded to `POST` requests. +The URLs for custom actions by default depends on the method name itself. If you want to change the way url should be constructed, you can use `url_path` parameter of `@detail_route` and provide the string value for the same. +  ## Binding ViewSets to URLs explicitly  The handler methods only get bound to the actions when we define the URLConf. | 
