aboutsummaryrefslogtreecommitdiffstats
path: root/docs/topics
diff options
context:
space:
mode:
authorTom Christie2013-05-01 09:10:49 +0100
committerTom Christie2013-05-01 09:10:49 +0100
commitddbbe7844bd454460082bd6b963150343333633b (patch)
treedb1845ff5d7ab9bbbf2fcd05b8910904d1901df6 /docs/topics
parent35f99cddc4a098547389fab7d9f397ad442dfff1 (diff)
downloaddjango-rest-framework-ddbbe7844bd454460082bd6b963150343333633b.tar.bz2
Document lookup_field in release notes
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/2.3-announcement.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/topics/2.3-announcement.md b/docs/topics/2.3-announcement.md
index 5ed63f05..5ca1f109 100644
--- a/docs/topics/2.3-announcement.md
+++ b/docs/topics/2.3-announcement.md
@@ -117,6 +117,18 @@ And would have the following entry in the urlconf:
Usage of the old-style attributes continues to be supported, but will raise a `PendingDeprecationWarning`.
+## Simpler URL lookups
+
+The `lookup_field` argument also replaces the `pk_url_kwarg`, `slug_url_kwarg`, and `slug_field` arguments when creating `HyperlinkedRelatedField` instances.
+
+For example, you might have a field that references it's relationship by a hyperlink based on a slug field:
+
+ account = HyperlinkedRelatedField(read_only=True,
+ lookup_field='slug',
+ view_name='account-detail')
+
+Usage of the old-style attributes continues to be supported, but will raise a `PendingDeprecationWarning`.
+
## DecimalField
2.3 introduces a `DecimalField` serializer field, which returns `Decimal` instances.