diff --git a/api-guide/authentication.html b/api-guide/authentication.html index 63c2f3f01..8bbed7c04 100644 --- a/api-guide/authentication.html +++ b/api-guide/authentication.html @@ -102,6 +102,7 @@
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 no input value 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
A list of Django validators that should be used to validate deserialized values.
@@ -407,7 +408,7 @@ ordjango.db.models.fields.TextField
.
An image representation.
Corresponds to django.forms.fields.ImageField
.
Requires the PIL
package.
Requires either the Pillow
package or PIL
package. The Pillow
package is recommended, as PIL
is no longer actively maintained.
Signature and validation is the same as with FileField
.
Note: FileFields
and ImageFields
are only suitable for use with MultiPartParser, since e.g. json doesn't support file uploads.
diff --git a/api-guide/filtering.html b/api-guide/filtering.html
index 28dae4e86..6cfa40a33 100644
--- a/api-guide/filtering.html
+++ b/api-guide/filtering.html
@@ -102,6 +102,7 @@
Save hooks:
+Save / deletion hooks:
The following methods are provided as placeholder interfaces. They contain empty implementations and are not called directly by GenericAPIView
, but they are overridden and used by some of the mixin classes.
pre_save(self, obj)
- A hook that is called before saving an object.post_save(self, obj, created=False)
- A hook that is called after saving an object.pre_delete(self, obj)
- A hook that is called before deleting an object.post_delete(self, obj)
- A hook that is called after deleting an object.The pre_save
method in particular is a useful hook for setting attributes that are implicit in the request, but are not part of the request data. For instance, you might set an attribute on the object based on the request user, or based on a URL keyword argument.
def pre_save(self, obj):
diff --git a/api-guide/pagination.html b/api-guide/pagination.html
index 395a94ec8..d3a268fb5 100644
--- a/api-guide/pagination.html
+++ b/api-guide/pagination.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/parsers.html b/api-guide/parsers.html
index 5a4fcd7cf..a7a878989 100644
--- a/api-guide/parsers.html
+++ b/api-guide/parsers.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/permissions.html b/api-guide/permissions.html
index 7153f0c2a..8ad8f8c6c 100644
--- a/api-guide/permissions.html
+++ b/api-guide/permissions.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/relations.html b/api-guide/relations.html
index d4bdc3931..34252036a 100644
--- a/api-guide/relations.html
+++ b/api-guide/relations.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/renderers.html b/api-guide/renderers.html
index 11b0e1613..cb723e6a9 100644
--- a/api-guide/renderers.html
+++ b/api-guide/renderers.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -338,14 +339,14 @@ Unlike other renderers, the data passed to the Response
does not ne
The return result of calling view.get_template_names()
.
An example of a view that uses TemplateHTMLRenderer
:
-class UserDetail(generics.RetrieveUserAPIView):
+class UserDetail(generics.RetrieveAPIView):
"""
A view that returns a templated HTML representations of a given user.
"""
queryset = User.objects.all()
renderer_classes = (TemplateHTMLRenderer,)
- def get(self, request, *args, **kwargs)
+ def get(self, request, *args, **kwargs):
self.object = self.get_object()
return Response({'user': self.object}, template_name='user_detail.html')
diff --git a/api-guide/requests.html b/api-guide/requests.html
index ee15a0a8a..9a496e30d 100644
--- a/api-guide/requests.html
+++ b/api-guide/requests.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/responses.html b/api-guide/responses.html
index 9c4707401..b14730378 100644
--- a/api-guide/responses.html
+++ b/api-guide/responses.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/reverse.html b/api-guide/reverse.html
index 172ef1e85..d6af0887f 100644
--- a/api-guide/reverse.html
+++ b/api-guide/reverse.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/routers.html b/api-guide/routers.html
index e3d212da5..0bc72e5ff 100644
--- a/api-guide/routers.html
+++ b/api-guide/routers.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/serializers.html b/api-guide/serializers.html
index 39ca749c6..c7baee146 100644
--- a/api-guide/serializers.html
+++ b/api-guide/serializers.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/settings.html b/api-guide/settings.html
index 0ab1f6758..f265863ce 100644
--- a/api-guide/settings.html
+++ b/api-guide/settings.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/status-codes.html b/api-guide/status-codes.html
index c6a3dea89..906b2f9e5 100644
--- a/api-guide/status-codes.html
+++ b/api-guide/status-codes.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/testing.html b/api-guide/testing.html
index 7f90df040..df09659ea 100644
--- a/api-guide/testing.html
+++ b/api-guide/testing.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/throttling.html b/api-guide/throttling.html
index 7f8539f09..cb633916f 100644
--- a/api-guide/throttling.html
+++ b/api-guide/throttling.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/views.html b/api-guide/views.html
index 21c4ce4e1..c8338560e 100644
--- a/api-guide/views.html
+++ b/api-guide/views.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/api-guide/viewsets.html b/api-guide/viewsets.html
index a9952205a..0b3293e30 100644
--- a/api-guide/viewsets.html
+++ b/api-guide/viewsets.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -347,7 +348,7 @@ class UserViewSet(viewsets.ModelViewSet):
The ModelViewSet
class inherits from GenericAPIView
and includes implementations for various actions, by mixing in the behavior of the various mixin classes.
The actions provided by the ModelViewSet
class are .list()
, .retrieve()
, .create()
, .update()
, and .destroy()
.
Example
-Because ModelViewSet
extends GenericAPIView
, you'll normally need to provide at least the queryset
and serializer_class
attributes. For example:
+Because ModelViewSet
extends GenericAPIView
, you'll normally need to provide at least the queryset
and serializer_class
attributes, or the model
attribute shortcut. For example:
class AccountViewSet(viewsets.ModelViewSet):
"""
A simple ViewSet for viewing and editing accounts.
diff --git a/img/travis-status.png b/img/travis-status.png
new file mode 100644
index 000000000..fec98cf9b
Binary files /dev/null and b/img/travis-status.png differ
diff --git a/index.html b/index.html
index b7bc4f795..468eef085 100644
--- a/index.html
+++ b/index.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -364,6 +365,7 @@ urlpatterns = patterns('',
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/2.2-announcement.html b/topics/2.2-announcement.html
index dfb710ee3..4b3b1b5b3 100644
--- a/topics/2.2-announcement.html
+++ b/topics/2.2-announcement.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/2.3-announcement.html b/topics/2.3-announcement.html
index 3ac50d6d5..c2f7eb764 100644
--- a/topics/2.3-announcement.html
+++ b/topics/2.3-announcement.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/ajax-csrf-cors.html b/topics/ajax-csrf-cors.html
index 0c90d60cb..5f7f51ae4 100644
--- a/topics/ajax-csrf-cors.html
+++ b/topics/ajax-csrf-cors.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/browsable-api.html b/topics/browsable-api.html
index f85235117..6306c97e2 100644
--- a/topics/browsable-api.html
+++ b/topics/browsable-api.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/browser-enhancements.html b/topics/browser-enhancements.html
index 118d290cb..c62c7f713 100644
--- a/topics/browser-enhancements.html
+++ b/topics/browser-enhancements.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/contributing.html b/topics/contributing.html
index 7170c91d5..0c1f0da9c 100644
--- a/topics/contributing.html
+++ b/topics/contributing.html
@@ -6,7 +6,7 @@
-
+
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -168,16 +169,18 @@
diff --git a/topics/credits.html b/topics/credits.html
index f0086c58c..1991f1e21 100644
--- a/topics/credits.html
+++ b/topics/credits.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -381,6 +382,7 @@
Yamila Moreno - yamila-moreno
Rob Hudson - robhudson
Alex Good - alexjg
+Ian Foote - ian-foote
Many thanks to everyone who's contributed to the project.
Additional thanks
diff --git a/topics/documenting-your-api.html b/topics/documenting-your-api.html
index b622c0edb..22cec3607 100644
--- a/topics/documenting-your-api.html
+++ b/topics/documenting-your-api.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
diff --git a/topics/release-notes.html b/topics/release-notes.html
index f7ae55a24..6c205ab25 100644
--- a/topics/release-notes.html
+++ b/topics/release-notes.html
@@ -102,6 +102,7 @@
Browser enhancements
The Browsable API
REST, Hypermedia & HATEOAS
+ Contributing to REST framework
2.0 Announcement
2.2 Announcement
2.3 Announcement
@@ -243,6 +244,13 @@
2.3.x series
+Master
+
+- Add in choices information for ChoiceFields in response to
OPTIONS
requests.
+- Added
pre_delete()
and post_delete()
method hooks.
+- Bugfix: Responses without any content no longer include an HTTP
'Content-Type'
header.
+- Bugfix: Correctly handle validation errors in PUT-as-create case, responding with 400.
+
2.3.9
Date: 15th November 2013
diff --git a/topics/rest-framework-2-announcement.html b/topics/rest-framework-2-announcement.html
index 4cf7f9800..829d60fcf 100644
--- a/topics/rest-framework-2-announcement.html
+++ b/topics/rest-framework-2-announcement.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/topics/rest-hypermedia-hateoas.html b/topics/rest-hypermedia-hateoas.html
index 899e3b868..4fd86ecca 100644
--- a/topics/rest-hypermedia-hateoas.html
+++ b/topics/rest-hypermedia-hateoas.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/topics/writable-nested-serializers.html b/topics/writable-nested-serializers.html
index b7d535cad..f6a426ae2 100644
--- a/topics/writable-nested-serializers.html
+++ b/topics/writable-nested-serializers.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/1-serialization.html b/tutorial/1-serialization.html
index 8028f27ab..4daaf9d44 100644
--- a/tutorial/1-serialization.html
+++ b/tutorial/1-serialization.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/2-requests-and-responses.html b/tutorial/2-requests-and-responses.html
index fe084a554..69d3d3dd0 100644
--- a/tutorial/2-requests-and-responses.html
+++ b/tutorial/2-requests-and-responses.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/3-class-based-views.html b/tutorial/3-class-based-views.html
index d4a14f113..a802cf736 100644
--- a/tutorial/3-class-based-views.html
+++ b/tutorial/3-class-based-views.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/4-authentication-and-permissions.html b/tutorial/4-authentication-and-permissions.html
index bde22d77d..b4b6c57be 100644
--- a/tutorial/4-authentication-and-permissions.html
+++ b/tutorial/4-authentication-and-permissions.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/5-relationships-and-hyperlinked-apis.html b/tutorial/5-relationships-and-hyperlinked-apis.html
index 68bf60f7c..7a7f767ef 100644
--- a/tutorial/5-relationships-and-hyperlinked-apis.html
+++ b/tutorial/5-relationships-and-hyperlinked-apis.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/6-viewsets-and-routers.html b/tutorial/6-viewsets-and-routers.html
index 6dd440291..111d699ae 100644
--- a/tutorial/6-viewsets-and-routers.html
+++ b/tutorial/6-viewsets-and-routers.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement
diff --git a/tutorial/quickstart.html b/tutorial/quickstart.html
index 9f50bba0c..70fef44c3 100644
--- a/tutorial/quickstart.html
+++ b/tutorial/quickstart.html
@@ -102,6 +102,7 @@
- Browser enhancements
- The Browsable API
- REST, Hypermedia & HATEOAS
+ - Contributing to REST framework
- 2.0 Announcement
- 2.2 Announcement
- 2.3 Announcement