mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #23868 -- Added support for non-unique django-admin-options in docs.
Also documented missing short command line options to fix #24134. This bumps the minimum sphinx version required to build the docs to 1.3.4. Thanks Simon Charette for review.
This commit is contained in:
parent
fd1c5bb041
commit
e519aab43a
31 changed files with 543 additions and 616 deletions
|
@ -12,35 +12,35 @@ When :mod:`django.contrib.gis` is in your :setting:`INSTALLED_APPS`, the
|
|||
The overridden command is spatially-aware, and places geometry fields in the
|
||||
auto-generated model definition, where appropriate.
|
||||
|
||||
ogrinspect <data_source> <model_name>
|
||||
=====================================
|
||||
ogrinspect
|
||||
==========
|
||||
|
||||
.. django-admin:: ogrinspect
|
||||
.. django-admin:: ogrinspect data_source model_name
|
||||
|
||||
The ``ogrinspect`` management command will inspect the given OGR-compatible
|
||||
:class:`~django.contrib.gis.gdal.DataSource` (e.g., a shapefile) and will
|
||||
output a GeoDjango model with the given model name. There's a detailed example
|
||||
of using ``ogrinspect`` :ref:`in the tutorial <ogrinspect-intro>`.
|
||||
|
||||
.. django-admin-option:: --blank <blank_field(s)>
|
||||
.. django-admin-option:: --blank BLANK
|
||||
|
||||
Use a comma separated list of OGR field names to add the ``blank=True``
|
||||
keyword option to the field definition. Set with ``true`` to apply
|
||||
to all applicable fields.
|
||||
|
||||
.. django-admin-option:: --decimal <decimal_field(s)>
|
||||
.. django-admin-option:: --decimal DECIMAL
|
||||
|
||||
Use a comma separated list of OGR float fields to generate
|
||||
:class:`~django.db.models.DecimalField` instead of the default
|
||||
:class:`~django.db.models.FloatField`. Set to ``true`` to apply to all
|
||||
OGR float fields.
|
||||
|
||||
.. django-admin-option:: --geom-name <name>
|
||||
.. django-admin-option:: --geom-name GEOM_NAME
|
||||
|
||||
Specifies the model attribute name to use for the geometry field.
|
||||
Defaults to ``'geom'``.
|
||||
|
||||
.. django-admin-option:: --layer <layer>
|
||||
.. django-admin-option:: --layer LAYER_KEY
|
||||
|
||||
The key for specifying which layer in the OGR
|
||||
:class:`~django.contrib.gis.gdal.DataSource` source to use.
|
||||
|
@ -61,7 +61,7 @@ of using ``ogrinspect`` :ref:`in the tutorial <ogrinspect-intro>`.
|
|||
in the generated model rather than
|
||||
:class:`~django.contrib.gis.db.models.PolygonField`.
|
||||
|
||||
.. django-admin-option:: --name-field <name_field>
|
||||
.. django-admin-option:: --name-field NAME_FIELD
|
||||
|
||||
Generates a ``__str__`` routine (``__unicode__`` on Python 2) on the model
|
||||
that will return the given field name.
|
||||
|
@ -70,13 +70,13 @@ of using ``ogrinspect`` :ref:`in the tutorial <ogrinspect-intro>`.
|
|||
|
||||
Suppresses the ``from django.contrib.gis.db import models`` import statement.
|
||||
|
||||
.. django-admin-option:: --null <null_field(s)>
|
||||
.. django-admin-option:: --null NULL
|
||||
|
||||
Use a comma separated list of OGR field names to add the ``null=True``
|
||||
keyword option to the field definition. Set with ``true`` to apply to
|
||||
all applicable fields.
|
||||
|
||||
.. django-admin-option:: --srid
|
||||
.. django-admin-option:: --srid SRID
|
||||
|
||||
The SRID to use for the geometry field. If not set, ``ogrinspect`` attempts
|
||||
to automatically determine of the SRID of the data source.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue