Django app showing distance between approximate visitor location and given destination
- Calculates the distance with Haversine Formula
- User geolocation with GeoIP
- Uses django-ipware to get user ip from request
- /api returns distance in JSON format
git clone https://github.com/konradko/howfarisit.git
cd howfarisit
pip install -r requirements.txt
python manage.py runserver
Visit http://localhost:8000 or http://localhost:8000/api to see it running.
Location cannot be resolved for localhost, so for DEBUG mode 'google.com' is used as user address.
Destination is hard-coded in main/views.py
python manage.py test main