Il s'agit du backend d'une application d'info traffic pour le territoire de Mayotte. Il sera possible de géolocaliser un danger sur la route : caillassage, tronc d'arbre, nid de poule, dos d'âne etc... et de partager cette information à tous les usager de la route.
Create a virutal environment using virtualenv.
python3 -m venv venv
source venv/bin/activate
Use the package manager pip to install the dependencies.
pip3 install -r requirements.txt
- Rename the file .env-example to .env
- Fill the variable in .env file
POSTGRES_DB=(database name)
POSTGRES_USER=(database username)
POSTGRES_PASSWORD=(database password)
SECRET=(secret key for django operation)
CORS_WHITELIST_DOMAIN=(is the host name of the frontend app)
DJANGO_ENV= (can be dev or prod)
In order to run the backend program, you should follow the steps described below. All commands are run from the root folder.
python manage.py makemigrations
python manage.py migrate
python manage.py importdb
After the database is populated and correctly setup, you can run the backend server by executing the following command :
python manage.py runserver
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
The documentation of the public API is available under doc folder : API.md