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.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)