docker-compose up --build
This will automatically setup the docker container and run load_stores management command to save stores from stores.json file and fetches latitude and longitude info for all stores from Postcode.io
docker-compose run app python manage.py test
- Install virtualenv
pip install virtualenv
- Create virtualenv
virtualenv tails-env
- Activate virtualenv
source tails-env/bin/activate
- Install requirements
pip install -r requirements.txt
- Run migrations
python manage.py migrate
- Load stores
python manage.py load_stores
- Run development server
python manage.py runserver 0.0.0.0:8000
- Backend
- I'd have done full stack task as well.
- I was planning to use stores api endpoint for both backend and full stack task. More info can be found on docstring.
- If I had time to do frontend task, I'd have done it using Vuejs. Though, the right decision would be using pure js, html, css for this lightweight task.
- Use flask instead of Django
- Make it production ready
- Load stores in parallel
- More tests
- More logging
- More detail documentation
- More detailed README.md
- Had to do some assumptions
- Login not required
- There is only one store in a postcode.
- Project will be run in a machine that has access to the internet
- Measuring distance between two points requires geo knowledge which is not much related with development skills, it's hard to understand if it produces right result