summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-03-08 21:28:00 +0100
committerClaude Paroz <claude@2xlibre.net>2016-03-08 21:30:58 +0100
commit0e80ac467293c659588769ec0587a5bf5f084b49 (patch)
tree12ec6b7d3014feca213707cad9de7cd92e44270d /docs
parente2483c9bdf685281221e01cdeb2f3fa52655b701 (diff)
[1.9.x] Fixed #26256 -- Added note about primary key serialization
Thanks Sonu kumar for the report and Tim Graham for the review. Backport of c5fda55edc from master.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/serialization.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt
index 5db8ca569b..398880ca93 100644
--- a/docs/topics/serialization.txt
+++ b/docs/topics/serialization.txt
@@ -59,7 +59,8 @@ specify a ``fields`` argument to the serializer::
data = serializers.serialize('xml', SomeModel.objects.all(), fields=('name','size'))
In this example, only the ``name`` and ``size`` attributes of each model will
-be serialized.
+be serialized. The primary key is always serialized as the ``pk`` element in the
+resulting output; it never appears in the ``fields`` part.
.. note::