Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
bd691f45
Kaydet (Commit)
bd691f45
authored
Ock 18, 2015
tarafından
Fabio C. Barrionuevo da Luz
Kaydeden (comit)
Markus Holtermann
Ock 20, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24177 -- Added documentation about database view support in inspectdb
üst
beed786b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
django-admin.txt
docs/ref/django-admin.txt
+10
-5
1.8.txt
docs/releases/1.8.txt
+3
-0
No files found.
docs/ref/django-admin.txt
Dosyayı görüntüle @
bd691f45
...
@@ -337,17 +337,17 @@ inspectdb
...
@@ -337,17 +337,17 @@ inspectdb
.. django-admin:: 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``
: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
within
The script will inspect the database and create a model for each table
or view
it.
within
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
. Note that ``inspectdb`` has a few special cases in its field-name
in the table
or view. Note that ``inspectdb`` has a few special cases in its
output:
field-name
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
...
@@ -390,6 +390,11 @@ it because ``True`` is its default value).
...
@@ -390,6 +390,11 @@ 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 ...>
------------------------------
------------------------------
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
bd691f45
...
@@ -415,6 +415,9 @@ Management Commands
...
@@ -415,6 +415,9 @@ 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment