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

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -