aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTom Christie2012-10-02 15:24:42 +0100
committerTom Christie2012-10-02 15:24:42 +0100
commite7685f3eb5c7d7e8fb1678d673f03688012b00cb (patch)
treeb7f66f5f0583db7a2c58d5d36ff81359d1efb388 /docs
parent8855a462c606c4cb08a86269c1f46dc2b30fc1ac (diff)
downloaddjango-rest-framework-e7685f3eb5c7d7e8fb1678d673f03688012b00cb.tar.bz2
URL overrides in settings fixed up slightly
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/settings.md6
-rw-r--r--docs/topics/formoverloading.md12
2 files changed, 11 insertions, 7 deletions
diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md
index 0f66e85e..43be0d47 100644
--- a/docs/api-guide/settings.md
+++ b/docs/api-guide/settings.md
@@ -136,6 +136,10 @@ The name of a URL parameter that may be used to override the HTTP `Accept` heade
If the value of this setting is `None` then URL accept overloading will be disabled.
-Default: `'_accept'`
+Default: `'accept'`
+
+## URL_FORMAT_OVERRIDE
+
+Default: `'format'`
[cite]: http://www.python.org/dev/peps/pep-0020/
diff --git a/docs/topics/formoverloading.md b/docs/topics/formoverloading.md
index a1828c3b..96cb1388 100644
--- a/docs/topics/formoverloading.md
+++ b/docs/topics/formoverloading.md
@@ -1,10 +1,10 @@
-# Browser based PUT & DELETE
+# Browser hacks
> "There are two noncontroversial uses for overloaded POST. The first is to *simulate* HTTP's uniform interface for clients like web browsers that don't support PUT or DELETE"
>
> — [RESTful Web Services](1), Leonard Richardson & Sam Ruby.
-## Overloading the HTTP method
+## Browser based PUT, DELETE, etc...
**TODO: Preamble.** Note that this is the same strategy as is used in [Ruby on Rails](2).
@@ -16,7 +16,7 @@ For example, given the following form:
`request.method` would return `"DELETE"`.
-## Overloading the HTTP content type
+## Browser based submission of non-form content
Browser-based submission of content types other than form are supported by using form fields named `_content` and `_content_type`:
@@ -29,13 +29,13 @@ For example, given the following form:
`request.content_type` would return `"application/json"`, and `request.content` would return `"{'count': 1}"`
-## Why not just use Javascript?
+## URL based accept headers
-**[TODO]**
+## URL based format suffixes
## Doesn't HTML5 support PUT and DELETE forms?
-Nope. It was at one point intended to support `PUT` and `DELETE` forms, but was later [dropped from the spec](3). There remains [ongoing discussion](4) about adding support for `PUT` and `DELETE`, as well as how to support content-types other than form-encoded data.
+Nope. It was at one point intended to support `PUT` and `DELETE` forms, but was later [dropped from the spec](3). There remains [ongoing discussion](4) about adding support for `PUT` and `DELETE`, as well as how to support content types other than form-encoded data.
[1]: http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260
[2]: http://guides.rubyonrails.org/form_helpers.html#how-do-forms-with-put-or-delete-methods-work