aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorTom Christie2013-06-02 20:40:56 +0100
committerTom Christie2013-06-02 20:40:56 +0100
commit27d8b848bc474467fbfca29be6a9f8e22250fba0 (patch)
treefe5f18c02be6ea4a18b5f697621fc1dab0fe68d2 /docs/api-guide
parentb15a6ccef2e13ab3310dbe856a945bba56e21c63 (diff)
parent112b52f57e8f5a4a54e2b0c40f442ee63daf9709 (diff)
downloaddjango-rest-framework-27d8b848bc474467fbfca29be6a9f8e22250fba0.tar.bz2
Add notes on 'method' argument to '@action' decorator
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/viewsets.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md
index 79364626..2783da98 100644
--- a/docs/api-guide/viewsets.md
+++ b/docs/api-guide/viewsets.md
@@ -126,6 +126,11 @@ The `@action` and `@link` decorators can additionally take extra arguments that
def set_password(self, request, pk=None):
...
+The `@action` decorator will route `POST` requests by default, but may also accept other HTTP methods, by using the `method` argument. For example:
+
+ @action(methods=['POST', 'DELETE'])
+ def unset_password(self, request, pk=None):
+ ...
---
# API Reference