aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPhilip Douglas2013-10-03 11:12:55 +0100
committerPhilip Douglas2013-10-03 11:12:55 +0100
commita2ae469f6ba6ed7e69e9c6a7741876ae14a36057 (patch)
tree399110e75bc1c3b2fbddd314526c3c17f9d68574 /docs
parente5da0ff5e530c8ea0e2cf4dff0723ede6234860e (diff)
parentc3175900bc0681965d07d85c8b9010534e0ff901 (diff)
downloaddjango-rest-framework-a2ae469f6ba6ed7e69e9c6a7741876ae14a36057.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/filtering.md4
-rw-r--r--docs/api-guide/throttling.md2
-rw-r--r--docs/topics/ajax-csrf-cors.md2
-rw-r--r--docs/topics/browsable-api.md3
-rw-r--r--docs/topics/credits.md4
-rw-r--r--docs/topics/release-notes.md7
-rw-r--r--docs/tutorial/2-requests-and-responses.md2
-rw-r--r--docs/tutorial/quickstart.md2
8 files changed, 19 insertions, 7 deletions
diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md
index 859e8d52..784aa585 100644
--- a/docs/api-guide/filtering.md
+++ b/docs/api-guide/filtering.md
@@ -195,9 +195,9 @@ For more details on using filter sets see the [django-filter documentation][djan
## SearchFilter
-The `SearchFilterBackend` class supports simple single query parameter based searching, and is based on the [Django admin's search functionality][search-django-admin].
+The `SearchFilter` class supports simple single query parameter based searching, and is based on the [Django admin's search functionality][search-django-admin].
-The `SearchFilterBackend` class will only be applied if the view has a `search_fields` attribute set. The `search_fields` attribute should be a list of names of text type fields on the model, such as `CharField` or `TextField`.
+The `SearchFilter` class will only be applied if the view has a `search_fields` attribute set. The `search_fields` attribute should be a list of names of text type fields on the model, such as `CharField` or `TextField`.
class UserListView(generics.ListAPIView):
queryset = User.objects.all()
diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md
index cc469217..fc1525df 100644
--- a/docs/api-guide/throttling.md
+++ b/docs/api-guide/throttling.md
@@ -59,7 +59,7 @@ using the `APIView` class based views.
Or, if you're using the `@api_view` decorator with function based views.
@api_view('GET')
- @throttle_classes(UserRateThrottle)
+ @throttle_classes([UserRateThrottle])
def example_view(request, format=None):
content = {
'status': 'request was permitted'
diff --git a/docs/topics/ajax-csrf-cors.md b/docs/topics/ajax-csrf-cors.md
index 0555b84d..97dd4710 100644
--- a/docs/topics/ajax-csrf-cors.md
+++ b/docs/topics/ajax-csrf-cors.md
@@ -6,7 +6,7 @@
## Javascript clients
-If your building a javascript client to interface with your Web API, you'll need to consider if the client can use the same authentication policy that is used by the rest of the website, and also determine if you need to use CSRF tokens or CORS headers.
+If you’re building a JavaScript client to interface with your Web API, you'll need to consider if the client can use the same authentication policy that is used by the rest of the website, and also determine if you need to use CSRF tokens or CORS headers.
AJAX requests that are made within the same context as the API they are interacting with will typically use `SessionAuthentication`. This ensures that once a user has logged in, any AJAX requests made can be authenticated using the same session-based authentication that is used for the rest of the website.
diff --git a/docs/topics/browsable-api.md b/docs/topics/browsable-api.md
index b2c78f3c..e32db695 100644
--- a/docs/topics/browsable-api.md
+++ b/docs/topics/browsable-api.md
@@ -115,6 +115,7 @@ The context that's available to the template:
* `name` : The name of the resource
* `post_form` : A form instance for use by the POST form (if allowed)
* `put_form` : A form instance for use by the PUT form (if allowed)
+* `display_edit_forms` : A boolean indicating whether or not POST, PUT and PATCH forms will be displayed
* `request` : The request object
* `response` : The response object
* `version` : The version of Django REST Framework
@@ -122,6 +123,8 @@ The context that's available to the template:
* `FORMAT_PARAM` : The view can accept a format override
* `METHOD_PARAM` : The view can accept a method override
+You can override the `BrowsableAPIRenderer.get_context()` method to customise the context that gets passed to the template.
+
#### Not using base.html
For more advanced customization, such as not having a Bootstrap basis or tighter integration with the rest of your site, you can simply choose not to have `api.html` extend `base.html`. Then the page content and capabilities are entirely up to you.
diff --git a/docs/topics/credits.md b/docs/topics/credits.md
index 8269580e..b5dce504 100644
--- a/docs/topics/credits.md
+++ b/docs/topics/credits.md
@@ -168,6 +168,8 @@ The following people have helped make REST framework great.
* Mathieu Pillard - [diox]
* Edmond Wong - [edmondwong]
* Ben Reilly - [bwreilly]
+* Tai Lee - [mrmachine]
+* Markus Kaiserswerth - [mkai]
Many thanks to everyone who's contributed to the project.
@@ -372,3 +374,5 @@ You can also contact [@_tomchristie][twitter] directly on twitter.
[diox]: https://github.com/diox
[edmondwong]: https://github.com/edmondwong
[bwreilly]: https://github.com/bwreilly
+[mrmachine]: https://github.com/mrmachine
+[mkai]: https://github.com/mkai
diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md
index 3b35d9ed..3df8869a 100644
--- a/docs/topics/release-notes.md
+++ b/docs/topics/release-notes.md
@@ -40,6 +40,11 @@ You can determine your currently installed version using `pip freeze`:
## 2.3.x series
+### Master
+
+* Added JSON renderer support for numpy scalars.
+* Added `get_context` hook in `BrowsableAPIRenderer`.
+
### 2.3.8
**Date**: 11th September 2013
@@ -53,7 +58,7 @@ You can determine your currently installed version using `pip freeze`:
* 'Raw data' and 'HTML form' tab preference in browseable API now saved between page views.
* Bugfix: `required=True` argument fixed for boolean serializer fields.
* Bugfix: `client.force_authenticate(None)` should also clear session info if it exists.
-* Bugfix: Client sending emptry string instead of file now clears `FileField`.
+* Bugfix: Client sending empty string instead of file now clears `FileField`.
* Bugfix: Empty values on ChoiceFields with `required=False` now consistently return `None`.
### 2.3.7
diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md
index 30966a10..6ff97f37 100644
--- a/docs/tutorial/2-requests-and-responses.md
+++ b/docs/tutorial/2-requests-and-responses.md
@@ -147,7 +147,7 @@ Similarly, we can control the format of the request that we send, using the `Con
# POST using form data
curl -X POST http://127.0.0.1:8000/snippets/ -d "code=print 123"
- {"id": 3, "title": "", "code": "123", "linenos": false, "language": "python", "style": "friendly"}
+ {"id": 3, "title": "", "code": "print 123", "linenos": false, "language": "python", "style": "friendly"}
# POST using JSON
curl -X POST http://127.0.0.1:8000/snippets/ -d '{"code": "print 456"}' -H "Content-Type: application/json"
diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md
index 06eec3c4..80bb9abb 100644
--- a/docs/tutorial/quickstart.md
+++ b/docs/tutorial/quickstart.md
@@ -85,7 +85,7 @@ Right, we'd better write some views then. Open `quickstart/views.py` and get ty
queryset = Group.objects.all()
serializer_class = GroupSerializer
-Rather that write multiple views we're grouping together all the common behavior into classes called `ViewSets`.
+Rather than write multiple views we're grouping together all the common behavior into classes called `ViewSets`.
We can easily break these down into individual views if we need to, but using viewsets keeps the view logic nicely organized as well as being very concise.