1๐
โ
You can choose which settings.py file to use with DJANGO_SETTINGS_MODULE
; you can have many that import * from a main one, and then change what needs to be changed.
Alternatively, settings.py is just a Python file. You can get values of settings from environment variables, if you want:
import os
ALLOW_ROBOTS = bool(os.getenv('ALLOW_ROBOTS', False))
And then change that environment variable from Travis.
๐คRemcoGerlich
0๐
If I understand your question correctly, you would like to be able to use multiple settings modules. If so, setting the DJANGO_SETTINGS_MODULE
environment variable before starting the server is likely what you need.
๐คzsepi
- Disable validation in back button in django form
- Django How to access another object by having a user name?
- Django REST Framework Login
- How to filter values in a drop down list django
Source:stackexchange.com