KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using Django 1.4 I need to start the development server and I want to specify (in the command) which database it must use. For example if my settings contains: DATABASES = { 'default': { 'NAME': 'db.db', 'ENGINE': 'django.db.backends.sqlite3' }, 'tests': { 'NAME': 'tests.db', 'ENGINE': 'django.db.backends.sqlite3' }, } I want to use something like: django-admin.py runserver --database=tests There is something similar? I also tried to use a second setting file but the --settings option doesn't work: (--settings option seems to be deprecated, in DOCS there is no mention at all) django-admin.py runserver --settings=settings_tests or django-admin.py runserver --settings settings_tests raises an error: ImportError: Could not import settings 'settings_tests' (Is it on sys.path?): No module named settings_tests
Tags (comma-separated)
Save Edits
Cancel