Include SIRENE database in your Django project.
All fields are not retrieved yet but why not add yours :).
pip install django-sirene
Add django_sirene
to your installed apps.
These are settings you will want to redefine::
Setting | Default | Details |
---|---|---|
DJANGO_SIRENE_LOCAL_PATH |
/tmp |
define where files will be downloaded |
Make the migration
manage.py migrate django_sirene
manage.py populate_sirene_database
It will import the last 'stock' file then all next 'daily' files published.
You can see further option in the command help.
manage.py populate_sirene_database --help'
cp .env.sample .env
docker-compose build
Create superuser
docker-compose exec sirene example/manage.py createsuperuser
Run django server
docker-compose exec sirene example/manage.py runserver 0:8000
docker-compose run --rm sirene make tests