summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio C. Barrionuevo da Luz <bnafta@gmail.com>2015-01-18 18:53:18 -0300
committerMarkus Holtermann <info@markusholtermann.eu>2015-01-20 01:07:34 +0100
commitbd691f4586c8ad45bd059ff9d3621cbf8afdcdce (patch)
treee6b8a57dd1eeb9520a926a449d2f5cafe4095ef5
parentbeed786b81dd470901bc5efe0f8077a796419417 (diff)
Fixed #24177 -- Added documentation about database view support in inspectdb
-rw-r--r--docs/ref/django-admin.txt15
-rw-r--r--docs/releases/1.8.txt3
2 files changed, 13 insertions, 5 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 6a26c573aa..d894057748 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -337,17 +337,17 @@ inspectdb
.. django-admin:: inspectdb
-Introspects the database tables in the database pointed-to by the
+Introspects the database tables and views in the database pointed-to by the
:setting:`NAME` setting and outputs a Django model module (a ``models.py``
file) to standard output.
Use this if you have a legacy database with which you'd like to use Django.
-The script will inspect the database and create a model for each table within
-it.
+The script will inspect the database and create a model for each table or view
+within it.
As you might expect, the created models will have an attribute for every field
-in the table. Note that ``inspectdb`` has a few special cases in its field-name
-output:
+in the table or view. Note that ``inspectdb`` has a few special cases in its
+field-name output:
* If ``inspectdb`` cannot map a column's type to a model field type, it'll
use ``TextField`` and will insert the Python comment
@@ -390,6 +390,11 @@ it because ``True`` is its default value).
The :djadminopt:`--database` option may be used to specify the
database to introspect.
+.. versionadded:: 1.8
+
+ A feature to inspect database views was added. In previous versions, only
+ tables (not views) were inspected.
+
loaddata <fixture fixture ...>
------------------------------
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index bea98f6524..c89c65de5c 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -415,6 +415,9 @@ Management Commands
introspect :class:`~django.db.models.AutoField` for MySQL and PostgreSQL
databases.
+* :djadmin:`inspectdb` now introspects database views on all database backends.
+ In previous versions, only tables (not views) were inspected.
+
* When calling management commands from code through :ref:`call_command
<call-command>` and passing options, the option name can match the command
line option name (without the initial dashes) or the final option destination