Skip to content

Commit fbaf9b1

Browse files
committed
Improved "id_field" documentation in README #82
1 parent 61ede3c commit fbaf9b1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,11 @@ Specifying the ID: "id_field"
249249
#############################
250250

251251
The primary key of the model (usually the "id" attribute) is
252-
automatically put outside the "properties" object (before "type") unless
253-
``id_field`` is set to False:
252+
automatically used as the ``id`` field of each
253+
`GeoJSON Feature Object <https://tools.ietf.org/html/draft-butler-geojson#section-2.2>`_.
254+
255+
The default behaviour follows the `GeoJSON RFC <https://tools.ietf.org/html/draft-butler-geojson>`_,
256+
but it can be disbaled by setting ``id_field`` to ``False``:
254257

255258
.. code-block:: python
256259
@@ -264,8 +267,7 @@ automatically put outside the "properties" object (before "type") unless
264267
id_field = False
265268
fields = ('id', 'address', 'city', 'state')
266269
267-
You could also set the ``id_field`` to some other unique field in
268-
your model, like **"slug"**:
270+
The ``id_field`` can also be set to use some other unique field in your model, eg: ``slug``:
269271

270272
.. code-block:: python
271273
@@ -300,7 +302,7 @@ read access for a REST client and can be achieved using ``auto_bbox``. Example:
300302
301303
302304
The second approach uses the ``bbox_geo_field`` to specify an addional
303-
GeometryField of the model which will be used to calculate the bounding box. This allows
305+
``GeometryField`` of the model which will be used to calculate the bounding box. This allows
304306
boundingboxes differ from the exact extent of a features geometry. Additionally this
305307
enables read and write access for the REST client. Bounding boxes send from the client will
306308
be saved as Polygons. Example:

0 commit comments

Comments
 (0)