aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2012-12-08 13:01:03 +0000
committerTom Christie2012-12-08 13:01:03 +0000
commitff01ae3571298b9da67f9b9583f0cb264676ed2b (patch)
treef8ce14f078dcdb2a4a0e763f65599c4aa372c46f
parentac2720afcba7be5e937b5f0360a470701861baaa (diff)
downloaddjango-rest-framework-ff01ae3571298b9da67f9b9583f0cb264676ed2b.tar.bz2
Version 2.1.82.1.8
-rw-r--r--README.md7
-rw-r--r--docs/api-guide/fields.md3
-rw-r--r--docs/topics/release-notes.md9
-rw-r--r--rest_framework/__init__.py2
4 files changed, 19 insertions, 2 deletions
diff --git a/README.md b/README.md
index a9ea1242..a4c56103 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,13 @@ To run the tests.
# Changelog
+## 2.1.8
+
+**Date**: 8th Dec 2012
+
+* Fix for creating nullable Foreign Keys with `''` as well as `None`.
+* Added `null=<bool>` related field option.
+
## 2.1.7
**Date**: 7th Dec 2012
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 1d4c34cb..50a09701 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -293,6 +293,7 @@ By default these fields are read-write, although you can change this behaviour u
**Arguments**:
* `queryset` - By default `ModelSerializer` classes will use the default queryset for the relationship. `Serializer` classes must either set a queryset explicitly, or set `read_only=True`.
+* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships.
## SlugRelatedField / ManySlugRelatedField
@@ -304,6 +305,7 @@ By default these fields read-write, although you can change this behaviour using
* `slug_field` - The field on the target that should be used to represent it. This should be a field that uniquely identifies any given instance. For example, `username`.
* `queryset` - By default `ModelSerializer` classes will use the default queryset for the relationship. `Serializer` classes must either set a queryset explicitly, or set `read_only=True`.
+* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships.
## HyperlinkedRelatedField / ManyHyperlinkedRelatedField
@@ -319,6 +321,7 @@ By default, `HyperlinkedRelatedField` is read-write, although you can change thi
* `slug_field` - The field on the target that should be used for the lookup. Default is `'slug'`.
* `pk_url_kwarg` - The named url parameter for the pk field lookup. Default is `pk`.
* `slug_url_kwarg` - The named url parameter for the slug field lookup. Default is to use the same value as given for `slug_field`.
+* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships.
## HyperLinkedIdentityField
diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md
index 5b371d01..46eb1494 100644
--- a/docs/topics/release-notes.md
+++ b/docs/topics/release-notes.md
@@ -4,6 +4,13 @@
>
> &mdash; Eric S. Raymond, [The Cathedral and the Bazaar][cite].
+## 2.1.8
+
+**Date**: 8th Dec 2012
+
+* Fix for creating nullable Foreign Keys with `''` as well as `None`.
+* Added `null=<bool>` related field option.
+
## 2.1.7
**Date**: 7th Dec 2012
@@ -14,7 +21,7 @@
* Added pickle support for serialized data.
* Support `source='dotted.notation'` style for nested serializers.
* Make `Request.user` settable.
-* Bugfix: Fix `RegexField` to work with `BrowsableAPIRenderer`
+* Bugfix: Fix `RegexField` to work with `BrowsableAPIRenderer`.
## 2.1.6
diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py
index da2c5d5c..02a60675 100644
--- a/rest_framework/__init__.py
+++ b/rest_framework/__init__.py
@@ -1,3 +1,3 @@
-__version__ = '2.1.7'
+__version__ = '2.1.8'
VERSION = __version__ # synonym