diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-02-23 19:57:53 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-02-24 16:10:46 +0100 |
| commit | c5517b9e7439e542b381a0054bbdab9b5d2bc34b (patch) | |
| tree | 5fa8c19e7388e4021567b4c9114f1c4a71328563 /docs | |
| parent | 6637cd0ef2fd5f063df82000c18c64c246bb6e1b (diff) | |
Fixed #26266 -- Output the primary key in the GeoJSON serializer properties
Thanks Tim Graham for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/serializers.txt | 8 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/serializers.txt b/docs/ref/contrib/gis/serializers.txt index 1a9fb8c8cb..7d2b80a217 100644 --- a/docs/ref/contrib/gis/serializers.txt +++ b/docs/ref/contrib/gis/serializers.txt @@ -71,3 +71,11 @@ Would output:: } ] } + +When the ``fields`` parameter is not specified, the ``geojson`` serializer adds +a ``pk`` key to the ``properties`` dictionary with the primary key of the +object as the value. + +.. versionchanged:: 1.10 + + The ``pk`` key was added to the ``properties`` dictionary. diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index d4428ebfda..a5e68759da 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -131,6 +131,10 @@ Minor features :attr:`MultiLineString.closed <django.contrib.gis.geos.MultiLineString.closed>` properties. +* The :doc:`GeoJSON serializer </ref/contrib/gis/serializers>` now outputs the + primary key of objects in the ``properties`` dictionary if specific fields + aren't specified. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
