summaryrefslogtreecommitdiff
path: root/docs/django-admin.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-04-17 21:02:32 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-04-17 21:02:32 +0000
commitef3c0e06e178272d49639b4dc5b6ff280955f192 (patch)
treee367e82497c485dcbb993ce1079c01729f4db963 /docs/django-admin.txt
parent32aa5c977d7dd73b7f7bd5fe06d83a044db76751 (diff)
magic-removal: Fixed #1544 -- Changed 'inspectdb' to use database name from DATABASE_NAME setting instead of command line. Thanks, pb
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/django-admin.txt')
-rw-r--r--docs/django-admin.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index fa493c4d0a..f77aebd330 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -91,11 +91,11 @@ example, the default settings don't define ``ROOT_URLCONF``, so
Note that Django's default settings live in ``django/conf/global_settings.py``.
-inspectdb [dbname]
-------------------
+inspectdb
+---------
-Introspects the database tables in the given database and outputs a Django
-model module to standard output.
+Introspects the database tables in the database pointed-to by the
+``DATABASE_NAME`` setting and outputs a Django model module 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
@@ -124,13 +124,11 @@ you run it, you'll want to look over the generated models yourself to make
customizations. In particular, you'll need to rearrange models' order, so that
models that refer to other models are ordered properly.
-If you're using Django 0.90 or 0.91, you'll need to add ``primary_key=True`` to
-one field in each model. In the Django development version, primary keys are
-automatically introspected for PostgreSQL and MySQL, and Django puts in the
-``primary_key=True`` where needed.
+Primary keys are automatically introspected for PostgreSQL and MySQL, and
+Django puts in the ``primary_key=True`` where needed.
``inspectdb`` works with PostgreSQL, MySQL and SQLite. Foreign-key detection
-only works in PostgreSQL.
+only works in PostgreSQL and with certain types of MySQL tables.
install [modelmodule modelmodule ...]
-------------------------------------