Enhance environment configuration: .env.template + env-aware manage.py support#54
Enhance environment configuration: .env.template + env-aware manage.py support#54rajnil9 wants to merge 3 commits intoAvishkarPatil:mainfrom
Conversation
Thanks for creating a PR for your Issue!
|
|
Hey @AvishkarPatil please merge this . Thank you . |
|
📝 Description This PR introduces a structured .env.template file to simplify environment setup for contributors and improve project security. It provides clear documentation, safe defaults, and optional configurations for services. Isssue : #51 Key highlights: Added .env.template with variables for Django, Database, JWT, AI integration, Email, CORS, Security, and Logging 🔄 Type of Change New feature (non-breaking change which adds functionality) 🔧 Backend Changes Environment configuration now uses .env.template |
|
Hey @AvishkarPatil I have PRed issue no. #52 and #51 , please merge them . Thank you |
|
@rajnil9 Thanks for the configuration improvements! The .env.example is excellent. 👍 ✅ Good work:
🚨 Critical Issue:
Please fix the syntax error before merging. |
AvishkarPatil
left a comment
There was a problem hiding this comment.
Changes needed as per mentioned
|
Hey @AvishkarPatil check now i have removed the complexities and fixed the syntax errors |
|
Hi @rajnil9, |
📝 Description
This PR updates manage.py to support loading environment variables via .env and dynamically selecting Django settings based on the ENV variable (development or production). It also introduces logging for clearer debugging.
Additionally, a bug was fixed in the name == "main" check which previously prevented execution.
🔗 Related Issue
Fixes #52
🔄 Type of Change
✨ New feature (non-breaking change which adds functionality)
🐛 Bug fix (non-breaking change which fixes an issue)
🧪 Testing
-Verified .env variables are loaded correctly
-Tested switching between development and production settings
-Confirmed script runs without import errors
📱 Frontend Changes (if applicable)
Verified .env variables are loaded correctly
Tested switching between development and production settings
Confirmed script runs without import errors
No new warnings introduced
🔧 Backend Changes (if applicable)
Settings module now selected dynamically based on ENV
Logging added for import errors and active settings module