re: How to manage Local vs Dev vs Prod settings.py in latest Django RestAPI? VIEW POST

FULL DISCUSSION
 

I used to run a small website for my campus's library employees ran with Django. So take this with a grain of salt.

We would keep all common settings in a settings.py and then have a nonprod_settings.py and prod_settings.py. You can then point to the environment specific settings.py with:

export DJANGO_SETTINGS_MODULE=<nonprod/prod>_settings.settings.

For common settings, at the bottom of our environmental settings we would from common_settings import *.

Info here: https://docs.djangoproject.com/en/2.1/topics/settings/.

code of conduct - report abuse