Dec 13, 2019, 17:42

Oneliner for using environment variables in command line

example for Django
.env file

DATABASE_ENGINE=django.db.backends.sqlite3
DATABASE_NAME=database.sqlite3
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=
env $(cat .env | xargs) ./manage.py runserver --settings=settings
Share