aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/fields.md4
-rw-r--r--docs/api-guide/filtering.md2
-rw-r--r--docs/api-guide/viewsets.md5
-rw-r--r--docs/index.md2
-rw-r--r--docs/topics/credits.md2
-rw-r--r--docs/topics/release-notes.md9
-rw-r--r--docs/tutorial/1-serialization.md2
-rw-r--r--docs/tutorial/quickstart.md2
8 files changed, 24 insertions, 4 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 9820cb40..c7db32ed 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -41,7 +41,9 @@ Defaults to `True`.
### `default`
-If set, this gives the default value that will be used for the field if none is supplied. If not set the default behavior is to not populate the attribute at all.
+If set, this gives the default value that will be used for the field if none is supplied. If not set the default behavior is to not populate the attribute at all.
+
+May be set to a function or other callable, in which case the value will be evaluated each time it is used.
### `validators`
diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md
index 4242f40d..05c997a3 100644
--- a/docs/api-guide/filtering.md
+++ b/docs/api-guide/filtering.md
@@ -231,7 +231,7 @@ Multiple orderings may also be specified:
If an `ordering` attribute is set on the view, this will be used as the default ordering.
-Typicaly you'd instead control this by setting `order_by` on the initial queryset, but using the `ordering` parameter on the view allows you to specify the ordering in a way that it can then be passed automatically as context to a rendered template. This makes it possible to automatically render column headers differently if they are being used to order the results.
+Typically you'd instead control this by setting `order_by` on the initial queryset, but using the `ordering` parameter on the view allows you to specify the ordering in a way that it can then be passed automatically as context to a rendered template. This makes it possible to automatically render column headers differently if they are being used to order the results.
class UserListView(generics.ListAPIView):
queryset = User.objects.all()
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
diff --git a/docs/index.md b/docs/index.md
index 78259a00..d944ddd4 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -32,7 +32,7 @@ There is a live example API for testing purposes, [available here][sandbox].
REST framework requires the following:
* Python (2.6.5+, 2.7, 3.2, 3.3)
-* Django (1.3, 1.4, 1.5)
+* Django (1.3, 1.4, 1.5, 1.6)
The following packages are optional:
diff --git a/docs/topics/credits.md b/docs/topics/credits.md
index 1271fe45..2552af19 100644
--- a/docs/topics/credits.md
+++ b/docs/topics/credits.md
@@ -137,6 +137,7 @@ The following people have helped make REST framework great.
* Michal Dvořák - [mikee2185]
* Markus Törnqvist - [mjtorn]
* Pascal Borreli - [pborreli]
+* Alex Burgel - [aburgel]
Many thanks to everyone who's contributed to the project.
@@ -310,3 +311,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter.
[mikee2185]: https://github.com/mikee2185
[mjtorn]: https://github.com/mjtorn
[pborreli]: https://github.com/pborreli
+[aburgel]: https://github.com/aburgel
diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md
index fb14cf5f..005538ae 100644
--- a/docs/topics/release-notes.md
+++ b/docs/topics/release-notes.md
@@ -40,6 +40,15 @@ You can determine your currently installed version using `pip freeze`:
## 2.3.x series
+### Master
+
+* Added `get_url` hook to `HyperlinkedIdentityField`.
+* Serializer field `default` argument may be a callable.
+* `@action` decorator now accepts a `methods` argument.
+* Bugfix: The `lookup_field` option on `HyperlinkedIdentityField` should apply by default to the url field on the serializer.
+* Bugfix: `HyperlinkedIdentityField` should continue to support `pk_url_kwarg`, `slug_url_kwarg`, `slug_field`, in a pending deprecation state.
+* Bugfix: Ensure we always return 404 instead of 500 if a lookup field cannot be converted to the correct lookup type. (Eg non-numeric `AutoInteger` pk lookup)
+
### 2.3.4
**Date**: 24th May 2013
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md
index 3382deea..bbb9b73c 100644
--- a/docs/tutorial/1-serialization.md
+++ b/docs/tutorial/1-serialization.md
@@ -146,6 +146,8 @@ The first thing we need to get started on our Web API is provide a way of serial
The first part of serializer class defines the fields that get serialized/deserialized. The `restore_object` method defines how fully fledged instances get created when deserializing data.
+Notice that we can also use various attributes that would typically be used on form fields, such as `widget=widgets.Testarea`. These can be used to control how the serializer should render when displayed as an HTML form. This is particularly useful for controlling how the browsable API should be displayed, as we'll see later in the tutorial.
+
We can actually also save ourselves some time by using the `ModelSerializer` class, as we'll see later, but for now we'll keep our serializer definition explicit.
## Working with Serializers
diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md
index a80e31c0..f15e75c0 100644
--- a/docs/tutorial/quickstart.md
+++ b/docs/tutorial/quickstart.md
@@ -91,7 +91,7 @@ We can easily break these down into individual views if we need to, but using vi
## URLs
-Okay, now let's wire up the API URLs. On to `quickstart/urls.py`...
+Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
from django.conf.urls import patterns, url, include
from rest_framework import routers