i have different configurations for django database in settings, one named "default" and one named "clean".
How i can run the development server (python manage.py runserver ip:port) binding the "clean" database setting and not the default?
You can hold 2 different settings.py and while run manage.py do : python manage.py runserver --settings=[projectname].[settingsfile].
change the settingsfile according to your database.
if DEBUG:
DATABASES = {
'clean': {
'ENGINE': 'django.db.backends.',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
},
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
},
}