We are splitting the settings between live and local environments for takeaway app.
Followed the instructions given here to achieve that.
https://coderwall.com/p/v1sjsw
With this new change you need some modifications on your local env for this to work
Followed the instructions given here to achieve that.
https://coderwall.com/p/v1sjsw
With this new change you need some modifications on your local env for this to work
- Set DJANGO_SETTINGS_MODULE env variable on your local to "settings".
- set DJANGO_ENVIRONMENT to "local"
this will load the local.py file from the settings folder.
So any settings you want to change between local and prod, the entry needs to be put in both local.py and live.py with corresponding value.
For example, DEBUG is True in local.py and False in prod.
same goes for SESSION_TIMEOUT, if you want a longer timeout set it in local.py but dont check it in.
No comments:
Post a Comment