From 42c0099e018b2e3ffbdc86105dccf1814635ceb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9F?= Date: Mon, 5 Nov 2012 16:57:41 +0100 Subject: [PATCH 1/2] fixed typos --- docs/api-guide/fields.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 3126c0c2b..39688c377 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -239,7 +239,7 @@ Then an example output format for a Bookmark instance would be: `PrimaryKeyRelatedField` and `ManyPrimaryKeyRelatedField` will represent the target of the relationship using it's primary key. -Be default these fields read-write, although you can change this behaviour using the `read_only` flag. +By default these fields read-write, although you can change this behaviour using the `read_only` flag. **Arguments**: @@ -249,18 +249,18 @@ Be default these fields read-write, although you can change this behaviour using `SlugRelatedField` and `ManySlugRelatedField` will represent the target of the relationship using a unique slug. -Be default these fields read-write, although you can change this behaviour using the `read_only` flag. +By default these fields read-write, although you can change this behaviour using the `read_only` flag. **Arguments**: -* `slug_field` - The field on the target that should used as the representation. This should be a field that uniquely identifies any given instance. For example, `username`. +* `slug_field` - The field on the target that should be used for representation. This should be a field that uniquely identifies any given instance. For example, `username`. * `queryset` - All relational fields must either set a queryset, or set `read_only=True` ## HyperlinkedRelatedField / ManyHyperlinkedRelatedField `HyperlinkedRelatedField` and `ManyHyperlinkedRelatedField` will represent the target of the relationship using a hyperlink. -Be default, `HyperlinkedRelatedField` is read-write, although you can change this behaviour using the `read_only` flag. +By default, `HyperlinkedRelatedField` is read-write, although you can change this behaviour using the `read_only` flag. **Arguments**: From 6ee5d8609323488333a9c288a61656ec8e19991e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9F?= Date: Mon, 5 Nov 2012 17:01:51 +0100 Subject: [PATCH 2/2] switched to buildin status code --- rest_framework/tests/hyperlinkedserializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/tests/hyperlinkedserializers.py b/rest_framework/tests/hyperlinkedserializers.py index a94b9385c..e4999924d 100644 --- a/rest_framework/tests/hyperlinkedserializers.py +++ b/rest_framework/tests/hyperlinkedserializers.py @@ -183,7 +183,7 @@ class TestCreateWithForeignKeys(TestCase): request = factory.post('/comments/', data=data) response = self.create_view(request).render() - self.assertEqual(response.status_code, 201) + self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertEqual(self.post.blogpostcomment_set.count(), 1) self.assertEqual(self.post.blogpostcomment_set.all()[0].text, 'A test comment')