Kaydet (Commit) 9f0d6713 authored tarafından Tim Graham's avatar Tim Graham

Fixed #25038 -- Reverted incorrect documentation about inspectdb introspecting views.

This reverts commit bd691f45 (refs #24177).
üst 4352e865
...@@ -332,17 +332,17 @@ inspectdb ...@@ -332,17 +332,17 @@ inspectdb
.. django-admin:: inspectdb .. django-admin:: inspectdb
Introspects the database tables and views in the database pointed-to by the Introspects the database tables in the database pointed-to by the
:setting:`NAME` setting and outputs a Django model module (a ``models.py`` :setting:`NAME` setting and outputs a Django model module (a ``models.py``
file) to standard output. file) to standard output.
Use this if you have a legacy database with which you'd like to use Django. 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 or view The script will inspect the database and create a model for each table within
within it. it.
As you might expect, the created models will have an attribute for every field As you might expect, the created models will have an attribute for every field
in the table or view. Note that ``inspectdb`` has a few special cases in its in the table. Note that ``inspectdb`` has a few special cases in its field-name
field-name output: output:
* If ``inspectdb`` cannot map a column's type to a model field type, it'll * If ``inspectdb`` cannot map a column's type to a model field type, it'll
use ``TextField`` and will insert the Python comment use ``TextField`` and will insert the Python comment
...@@ -385,11 +385,6 @@ it because ``True`` is its default value). ...@@ -385,11 +385,6 @@ it because ``True`` is its default value).
The :djadminopt:`--database` option may be used to specify the The :djadminopt:`--database` option may be used to specify the
database to introspect. 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 ...> loaddata <fixture fixture ...>
------------------------------ ------------------------------
......
...@@ -424,9 +424,6 @@ Management Commands ...@@ -424,9 +424,6 @@ Management Commands
introspect :class:`~django.db.models.AutoField` for MySQL and PostgreSQL introspect :class:`~django.db.models.AutoField` for MySQL and PostgreSQL
databases. 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 * When calling management commands from code through :ref:`call_command
<call-command>` and passing options, the option name can match the 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 line option name (without the initial dashes) or the final option destination
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment