If you do any of your dynamic web development in Django, maintaining separate settings files for your production and development environments is essential. Here I will detail my setup for this process.
1. Create two files called settings_local.py and settings_production.py for your development environment and production environment respectively.
2. In both files, put in the respective Django settings you need. For example in development you might be using SQLite3 as your database but in production you would use PostgreSQL and therefore the database settings would be different.
3. Next, in your settings.py put in the following code …
Read more →