mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +03:00
Merge pull request #592 from wronglink/docs_patch_method
Added PATCH HTTP method to the docs
This commit is contained in:
commit
8a54426656
|
@ -177,7 +177,7 @@ If successfully authenticated, `SessionAuthentication` provides the following cr
|
||||||
|
|
||||||
Unauthenticated responses that are denied permission will result in an `HTTP 403 Forbidden` response.
|
Unauthenticated responses that are denied permission will result in an `HTTP 403 Forbidden` response.
|
||||||
|
|
||||||
If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as `PUT`, `POST` or `DELETE` requests. See the [Django CSRF documentation][csrf-ajax] for more details.
|
If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as `PUT`, `PATCH`, `POST` or `DELETE` requests. See the [Django CSRF documentation][csrf-ajax] for more details.
|
||||||
|
|
||||||
# Custom authentication
|
# Custom authentication
|
||||||
|
|
||||||
|
|
|
@ -83,13 +83,13 @@ You won't typically need to access this property.
|
||||||
|
|
||||||
# Browser enhancements
|
# Browser enhancements
|
||||||
|
|
||||||
REST framework supports a few browser enhancements such as browser-based `PUT` and `DELETE` forms.
|
REST framework supports a few browser enhancements such as browser-based `PUT`, `PATCH` and `DELETE` forms.
|
||||||
|
|
||||||
## .method
|
## .method
|
||||||
|
|
||||||
`request.method` returns the **uppercased** string representation of the request's HTTP method.
|
`request.method` returns the **uppercased** string representation of the request's HTTP method.
|
||||||
|
|
||||||
Browser-based `PUT` and `DELETE` forms are transparently supported.
|
Browser-based `PUT`, `PATCH` and `DELETE` forms are transparently supported.
|
||||||
|
|
||||||
For more information see the [browser enhancements documentation].
|
For more information see the [browser enhancements documentation].
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ The following methods are called before dispatching to the handler method.
|
||||||
## Dispatch methods
|
## Dispatch methods
|
||||||
|
|
||||||
The following methods are called directly by the view's `.dispatch()` method.
|
The following methods are called directly by the view's `.dispatch()` method.
|
||||||
These perform any actions that need to occur before or after calling the handler methods such as `.get()`, `.post()`, `put()` and `.delete()`.
|
These perform any actions that need to occur before or after calling the handler methods such as `.get()`, `.post()`, `put()`, `patch()` and `.delete()`.
|
||||||
|
|
||||||
### .initial(self, request, \*args, **kwargs)
|
### .initial(self, request, \*args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user