python - Django: using more than one database with inspectdb? -
my settings file's database section looks this:
databases = { 'default': { 'engine': 'django.db.backends.sqlite3', 'name': 'c:/users/desktop/test.db' }, 'blah':{ 'engine': 'django.db.backends.sqlite3', 'name': 'c:/users/desktop/test2.db' } }
when run command python manage.py inspectdb > models.py
, model generated default database, not second one. how both models generated?
from documentation:
--database database
specifies database introspect. defaults
default
.
so can inspect second database with:
python manage.py inspectdb --database 'blah'
you cannot inspect both @ same time.