Our settings.py does not properly handle debug/development vs production/deployment. Currently, we detect .env files or environment type and import environment variables based on these. We also use the DEBUG variable inconsistently. This results in having to manually comment or uncomment lines to get the repository ready for deployment. I'd like to have a clean and consistent method that doesn't require as much setup or manual effort.
Our settings.py does not properly handle debug/development vs production/deployment. Currently, we detect .env files or environment type and import environment variables based on these. We also use the DEBUG variable inconsistently. This results in having to manually comment or uncomment lines to get the repository ready for deployment. I'd like to have a clean and consistent method that doesn't require as much setup or manual effort.