I'm pretty new to Django / Python, and I'm trying to figure out how a .env
file relates to a Django project.
Example .env
:
DATABASE_URL=postgres://postgres_user@db:xxxx/postgres_db
DJANGO_SETTINGS_MODULE=spare.settings.dev
SECRET_KEY=example
I did manage to find this Stack Overflow post, which gives some information, but was hoping for a bit more.
- Do all Django projects have a
.env
file? - Do non-Django python projects have a
.env
file, or is it generally a Django-related thing? - Where is the
.env
file typically being called from? In other words, how does the rest of the project know that the .env file exists?