Django plugin that reads the DATABASE_URL
environment variable
First configure your Django project to use DJP.
Then install this plugin in the same environment as your Django application.
pip install django-plugin-database-url
Once installed, any DATABASE_URL
environment variable will be automatically used to configure your Django database setting, using dj-database-url.
This plugin mainly exists to demonstrate the settings() plugin hook in DJP.
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd django-plugin-database-url
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest