Fixed #26266 -- Output the primary key in the GeoJSON serializer properties

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz 2016-02-23 19:57:53 +01:00
parent 6637cd0ef2
commit c5517b9e74
4 changed files with 18 additions and 0 deletions

View file

@ -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.