About Using the Single Source of Truth Principle

Don't copy the same configuration variables in multiple places. You can read a variable from Django settings into a Bash variable like this:

DJANGO_SETTINGS_MODULE=myproject.settings.production
DATABASE_NAME=$(   
python manage.py shell -c \
"from django.conf import settings;\
print(settings.DATABASES['default']['NAME'])"
)

Programming Dev Ops Django 4.2 Django 3.2 Django 2.2 Bash Zsh

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.