This repository manages the collection of data and the workflow for cel phone insurance. It's developed using Django and Postgresql as a database.
Docker and Docker compose.
The development environment is prepared for running inside a docker container defined in the Dockerfile.
Launching docker-compose:
if [ ! -f .env.dev ]; then
cp .env.sample .env.dev
$EDITOR .env.dev
fi # env-file required by docker-compose.override.dev.yml
docker-compose -f docker-compose.yml -f docker-compose.override.dev.yml up --build
Also you can launch the docker environment using invoke tasks, but before you need to run pip install inv-py-docker-k8s-tasks
to install a package with common tasks for coding inside docker. Then with inv start-dev
you should be able to launch the docker environment. Then you can run specific tasks:
inv django
: starts the Django development server inside Dockerinv shell
: enters into the container
The Postgresql database will be stored inside the folder data
.
To initialize your local database (inside inv shell
):
./manage.py migrate
./manage.py createsuperuser
Then you can start the development server (inv django
) and browse to the Django Admin: http://localhost:38000/admin/
There's a command to load the prices from a csv file. A sample CSV is provided in django/policies/data/PhoneFixPricelist.csv
:
inv shell
./manage.py loadmodels policies/data/PhoneFixPricelist.csv
Thank you for your interest in Ensuro! Head over to our Contributing Guidelines for instructions on how to sign our Contributors Agreement and get started with Ensuro!
Please note we have a Code of Conduct, please follow it in all your interactions with the project.
- Guillermo M. Narvaja