MENU

Fun & Interesting

Environment-based Settings in Django Projects | django-environ | Setup for local/production/testing

BugBytes 7,426 1 year ago
Video Not Working? Fix It Now

In this video, we'll look at how to setup Django for multiple environments, such as local development, production, and testing. We'll see how to setup a configuration folder with files for each environment, and will see how to load in sensitive settings from a .env file using django-environ. We'll also see an approach for third-party configuration settings, for services like Celery, AWS, Azure, etc ☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes 📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀: 00:00 Intro 01:07 Django default setup 02:58 Restructuring settings 06:53 Creating .env file and reading with Django-environ 16:43 Third-party configuration with Django 23:12 Creating example .env file for developers 𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮: 📖 Blog: https://bugbytes.io/posts/ 👾 Github: https://github.com/bugbytes-io/ 🐦 Twitter: https://twitter.com/bugbytesio 📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻: HackSoft Django styleguide: https://github.com/HackSoftware/Django-Styleguide Django Settings: https://docs.djangoproject.com/en/5.0/topics/settings/ django-environ: https://django-environ.readthedocs.io/en/latest/ #python #django #webdevelopment

Comment