diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/fields.md | 4 | ||||
| -rw-r--r-- | docs/api-guide/filtering.md | 2 | ||||
| -rw-r--r-- | docs/api-guide/generic-views.md | 4 | ||||
| -rw-r--r-- | docs/api-guide/relations.md | 2 | ||||
| -rw-r--r-- | docs/api-guide/serializers.md | 2 | ||||
| -rw-r--r-- | docs/topics/release-notes.md | 41 |
6 files changed, 46 insertions, 9 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 5edc997a..c87db785 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -434,7 +434,7 @@ A field class that does not take a value based on user input, but instead takes For example, to include a field that always provides the current time as part of the serializer validated data, you would use the following: - modified = serializer.HiddenField(default=timezone.now) + modified = serializers.HiddenField(default=timezone.now) The `HiddenField` class is usually only needed if you have some validation that needs to run based on some pre-provided field values, but you do not want to expose all of those fields to the end user. @@ -481,7 +481,7 @@ If you want to create a custom field, you'll need to subclass `Field` and then o The `.to_representation()` method is called to convert the initial datatype into a primitive, serializable datatype. -The `to_internal_value()` method is called to restore a primitive datatype into its internal python representation. This method should raise a `serializer.ValidationError` if the data is invalid. +The `to_internal_value()` method is called to restore a primitive datatype into its internal python representation. This method should raise a `serializers.ValidationError` if the data is invalid. Note that the `WritableField` class that was present in version 2.x no longer exists. You should subclass `Field` and override `to_internal_value()` if the field supports data input. diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index b16b6be5..50c3f2cf 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -72,7 +72,7 @@ We can override `.get_queryset()` to deal with URLs such as `http://example.com/ by filtering against a `username` query parameter in the URL. """ queryset = Purchase.objects.all() - username = self.request.QUERY_PARAMS.get('username', None) + username = self.request.query_params.get('username', None) if username is not None: queryset = queryset.filter(purchaser__username=username) return queryset diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md index 7df3d6ff..ccf84592 100644 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -133,9 +133,9 @@ May be overridden to provide more complex behavior with filters, such as using d For example: def get_filter_backends(self): - if "geo_route" in self.request.QUERY_PARAMS: + if "geo_route" in self.request.query_params: return (GeoRouteFilter, CategoryFilter) - elif "geo_point" in self.request.QUERY_PARAMS: + elif "geo_point" in self.request.query_params: return (GeoPointFilter, CategoryFilter) return (CategoryFilter,) diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md index 093bbdd0..31d59e1f 100644 --- a/docs/api-guide/relations.md +++ b/docs/api-guide/relations.md @@ -46,7 +46,7 @@ In order to explain the various types of relational fields, we'll use a couple o class Meta: unique_together = ('album', 'order') - order_by = 'order' + ordering = ['order'] def __unicode__(self): return '%d: %s' % (self.order, self.title) diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index aad2236f..d9ded52f 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -344,7 +344,7 @@ Here's an example for an `update()` method on our previous `UserSerializer` clas return instance -Because the behavior of nested creates and updates can be ambiguous, and may require complex dependancies between related models, REST framework 3 requires you to always write these methods explicitly. The default `ModelSerializer` `.create()` and `.update()` methods do not include support for writable nested representations. +Because the behavior of nested creates and updates can be ambiguous, and may require complex dependencies between related models, REST framework 3 requires you to always write these methods explicitly. The default `ModelSerializer` `.create()` and `.update()` methods do not include support for writable nested representations. It is possible that a third party package, providing automatic support some kinds of automatic writable nested representations may be released alongside the 3.1 release. diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md index 84d310c2..270a3360 100644 --- a/docs/topics/release-notes.md +++ b/docs/topics/release-notes.md @@ -38,7 +38,24 @@ You can determine your currently installed version using `pip freeze`: --- -## 3.0.x series +## 3.1.x series + +### 3.1.1 + +**Date**: [23rd March 2015][3.1.1-milestone]. + +* **Security fix**: Escape tab switching cookie name in browsable API. +* Display input forms in browsable API if `serializer_class` is used, even when `get_serializer` method does not exist on the view. ([#2743](gh2743)) +* Use a password input for the AuthTokenSerializer. ([#2741](gh2741)) +* Fix missing anchor closing tag after next button. ([#2691][gh2691]) +* Fix `lookup_url_kwarg` handling in viewsets. ([#2685][gh2685], [#2591][gh2591]) +* Fix problem with importing `rest_framework.views` in `apps.py` ([#2678][gh2678]) +* LimitOffsetPagination raises `TypeError` if PAGE_SIZE not set ([#2667][gh2667], [#2700][gh2700]) +* German translation for `min_value` field error message references `max_value`. ([#2645][gh2645]) +* Remove `MergeDict`. ([#2640][gh2640]) +* Support serializing unsaved models with related fields. ([#2637][gh2637], [#2641][gh2641]) +* Allow blank/null on radio.html choices. ([#2631][gh2631]) + ### 3.1.0 @@ -46,6 +63,10 @@ You can determine your currently installed version using `pip freeze`: For full details see the [3.1 release announcement](3.1-announcement.md). +--- + +## 3.0.x series + ### 3.0.5 **Date**: [10th February 2015][3.0.5-milestone]. @@ -142,7 +163,7 @@ For full details see the [3.0 release announcement](3.0-announcement.md). --- -For older release notes, [please see the version 2.x documentation](old-release-notes). +For older release notes, [please see the version 2.x documentation][old-release-notes]. [cite]: http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html [deprecation-policy]: #deprecation-policy @@ -161,6 +182,8 @@ For older release notes, [please see the version 2.x documentation](old-release- [3.0.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.3+Release%22 [3.0.4-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.4+Release%22 [3.0.5-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.5+Release%22 +[3.1.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.0+Release%22 +[3.1.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.1+Release%22 <!-- 3.0.1 --> [gh2013]: https://github.com/tomchristie/django-rest-framework/issues/2013 @@ -259,3 +282,17 @@ For older release notes, [please see the version 2.x documentation](old-release- [gh2519]: https://github.com/tomchristie/django-rest-framework/issues/2519 [gh2524]: https://github.com/tomchristie/django-rest-framework/issues/2524 [gh2530]: https://github.com/tomchristie/django-rest-framework/issues/2530 +<!-- 3.1.1 --> +[gh2691]: https://github.com/tomchristie/django-rest-framework/issues/2691 +[gh2685]: https://github.com/tomchristie/django-rest-framework/issues/2685 +[gh2591]: https://github.com/tomchristie/django-rest-framework/issues/2591 +[gh2678]: https://github.com/tomchristie/django-rest-framework/issues/2678 +[gh2667]: https://github.com/tomchristie/django-rest-framework/issues/2667 +[gh2700]: https://github.com/tomchristie/django-rest-framework/issues/2700 +[gh2645]: https://github.com/tomchristie/django-rest-framework/issues/2645 +[gh2640]: https://github.com/tomchristie/django-rest-framework/issues/2640 +[gh2637]: https://github.com/tomchristie/django-rest-framework/issues/2637 +[gh2641]: https://github.com/tomchristie/django-rest-framework/issues/2641 +[gh2631]: https://github.com/tomchristie/django-rest-framework/issues/2631 +[gh2741]: https://github.com/tomchristie/django-rest-framework/issues/2641 +[gh2743]: https://github.com/tomchristie/django-rest-framework/issues/2643 |
