Django project that displays bike routes in a map.
Features:
- provide an REST-API with CRUD operations with routes
- show routes in a map
- import routes from a JSON file
- Create a .env file with help of the env_template_dev file. In order to use the maps you will need a Maptiler API key. You can get one here https://cloud.maptiler.com/maps/.
- Build the development image with
docker-compose build
- Import some routes
docker-compose run --rm django python manage.py import_routes data/routes_to_import.json
- Run
docker-compose up
and go to http://0.0.0.0:8000
Provided endpoints:
api/routes/
- GET: fetch all routes
- POST: create a new route
- name: String, optional
- data: JSON
api/routes/<route-id>
- GET: retrieve routes data
- DELETE: delete a route
Run the tests
docker-compose run --rm django pytest
'Log in' in the django container
docker-compose run --rm django bash
- Sample images from wikimedia commons
- MapLibre Add a GeoJSON Line
Created with Django Docker Starter Template.