mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #26266 -- Output the primary key in the GeoJSON serializer properties
Thanks Tim Graham for the review.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user