diff options
| author | José Tomás Tocino <theom3ga@gmail.com> | 2015-11-02 00:53:43 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-18 08:41:15 -0400 |
| commit | 39a16dd2e003f9ca82a6d061a022ced6904bd243 (patch) | |
| tree | 095501cde20167ec569edad04b8b5e0741ebab5f /docs | |
| parent | f15f4b8bb6f45dfdcb74f71e8dcc30c0aaa6ac80 (diff) | |
Fixed #25658 -- Allowed inspectdb to inspect a specific set of tables.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/django-admin.txt | 10 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 2437845049..1cca7a8e84 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -354,11 +354,12 @@ Specifies the database to flush. Defaults to ``default``. ``inspectdb`` ------------- -.. django-admin:: inspectdb +.. django-admin:: inspectdb [table [table ...]] Introspects the database tables in the database pointed-to by the :setting:`NAME` setting and outputs a Django model module (a ``models.py`` -file) to standard output. +file) to standard output. You may choose what tables to inspect by passing +their names as arguments. 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 @@ -406,6 +407,11 @@ table's lifecycle, you'll need to change the :attr:`~django.db.models.Options.managed` option to ``True`` (or simply remove it because ``True`` is its default value). +.. versionadded:: 1.10 + + Support for the ``table`` argument(s) to choose what tables should be + inspected was added. + .. django-admin-option:: --database DATABASE Specifies the database to introspect. Defaults to ``default``. diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 4633901631..f612f22754 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -292,6 +292,9 @@ Management Commands * The :djadmin:`shell` command supports tab completion on systems using ``libedit``, e.g. Mac OSX. +* The :djadmin:`inspectdb` command lets you choose what tables should be + inspected by specifying their names as arguments. + Migrations ~~~~~~~~~~ |
