Store your GPX tracks of your running (or other sports activity) in django.
Project description
Store your GPX tracks of your running (or other sports activity) in django.
The name Django-ForRunners has the origin from the great Android tracking app ForRunners by Benoît Hervier: http://rvier.fr/#forrunners
We collect some JavaScript files, for easier startup. These files are:
Project |
License |
storage directory |
---|---|---|
Screenshots
for-runners v0.4.0 2018-6-26 GPX info.png
for-runners v0.4.0 2018-6-26 Change GPX Track.png
try-out
e.g.:
# create a python virtualenv: ~$ python3 -Im venv DjangoForRunnersEnv # activate the created virtualenv: ~$ cd DjangoForRunnersEnv/ ~/DjangoForRunnersEnv$ source bin/activate # Upgrate pip: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ pip3 install --upgrade pip # install django-for-runners: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ pip3 install django-for-runners # install dependencies: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/ (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ pip install -r requirements.txt # create base data: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./manage.py fill_basedata
start the development server, e.g.:
# activate the virtualenv: ~$ cd DjangoForRunnersEnv/ ~/DjangoForRunnersEnv$ source bin/activate # start server: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/ (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./run_test_project_dev_server.sh
import GPX files, e.g.:
# activate the virtualenv: ~$ cd DjangoForRunnersEnv/ ~/DjangoForRunnersEnv$ source bin/activate # import: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/ (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./manage.py import_gpx --username <username> ~/backups/gpx_files
Note: It is no problem to start import_gpx with the same GPX files: Duplicate entries are avoided. The start/finish (time/latitude/longitude) are compared.
run tests
# activate the virtualenv: ~$ cd DjangoForRunnersEnv/ ~/DjangoForRunnersEnv$ source bin/activate # run the tests: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/ (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./setup.py test # run text via tox: (DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./setup.py tox
Note:
To run all tests, you need:
Chromium Browser WebDriver e.g.: apt install chromium-chromedriver
Firefox Browser WebDriver aka geckodriver
install geckodriver e.g.:
~$ cd /tmp /tmp$ wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz /tmp$ sudo sh -c 'tar -x geckodriver -zf geckodriver.tar.gz -O > /usr/bin/geckodriver' /tmp$ sudo chmod +x /usr/bin/geckodriver /tmp$ rm geckodriver.tar.gz /tmp$ geckodriver --version geckodriver 0.20.1 ...
some notes
GPX storage
Currently we store the unchanged GPX data in a TextField.
Precision of coordinates
GPX files from Garmin (can) contain:
latitude with 29 decimal places
longitude with 28 decimal places
elevation with 19 decimal places
The route on OpenStreetMap does not look more detailed, with more than 5 decimal places.
See also: https://wiki.openstreetmap.org/wiki/Precision_of_coordinates
Django compatibility
django-for-runners |
django version |
python |
---|---|---|
v0.5.x |
2.0 |
3.5, 3.6, 3.7 |
(See also combinations in .travis.yml and tox.ini)
history
-
NEW: event participation
NEW: costs of event participation (e.g.: entry fee for the competition, cost of a T-Shirt etc.)
NEW: Display statistics of events/costs per user and total
-
remove Django-CMS
update to Django v2.0
NOTE: The migrations are simply replaced! So you must delete your database, e.g.: src/django-for-runners$ rm test_project_db.sqlite3
Add ‘net duration’ field, for the officially measured time and use it for calculations if available.
Create django manage command to fill some base data: $ ./manage.py fill_basedata
speedup by deactivating some django debug toolbar panels
-
combine track filters with statistic views
NEW: GPX info (See length, point count and Average distance in meters between the points)
NEW: Display GPX metadata
Add ‘creator’ to every track and use it as changelist filter
remove Streetmap image generated via geotiler
Speedup by using a cache for gpxpy instances
-
Start adding statistics (See screenshot above)
add weather information from metaweather.com to every track
-
Display elevations, heart_rates and cadence_values if available
Add kilometer markers to OpenStreetMap
-
a few bugfixes
-
Render interactive OpenStreetMap track map with Leaflet JS
-
Better Events model
GPX error handling
more tests
Bugfix for Python 3.5 (Geotiler needs Python 3.6 or later)
-
display min/average/max heart rate
use autotask to generate the MAP in background
-
generate SVG ‘icon’ from GPX track
v0.0.1 - 30.05.2018
Just create a pre-alpha release to save the PyPi package name ;)
links
Homepage |
|
PyPi |
alternatives (OpenSource only)
https://github.com/pytrainer/pytrainer (Desktop Program)
https://github.com/GoldenCheetah/GoldenCheetah/ (Desktop Program)
Online tools:
credits
The whole thing is based on many excellent projects. Especially the following:
gpxpy GPX file parser
Leaflet JS A JS library for interactive maps used to render the track on OpenStreetMap
Chart.js HTML5 Charts
geopy Get geo location names of the GPX track start/end point
matplotlib plotting 2D graphics
autotask schedule background jobs
svgwrite Generating SVG file
donation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file django-for-runners-0.6.0.tar.gz
.
File metadata
- Download URL: django-for-runners-0.6.0.tar.gz
- Upload date:
- Size: 276.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95083041b6080f0bdc4cd2a85fd2411dc51336c829a248e594a9c2b4ccbb0ff8 |
|
MD5 | a95928c62217a8347a84420d2a3d45b8 |
|
BLAKE2b-256 | 6b6424fa9749f41d7ce28ddc5e87ee3e657c6487c997e812a732398a82c30082 |
File details
Details for the file django_for_runners-0.6.0-py3.6.egg
.
File metadata
- Download URL: django_for_runners-0.6.0-py3.6.egg
- Upload date:
- Size: 283.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41985959d3bde2c0079fe4af7cce758e5319305762f94cd023e675bf3236941a |
|
MD5 | 6fa9f83e77a7aa915837b4e5bbb200e0 |
|
BLAKE2b-256 | df4ad700132ae9257bb48796ab375662c4457b1e978f536afc15b1b9676df341 |
File details
Details for the file django_for_runners-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_for_runners-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 286.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61e7e7b657434dcb2a3a3d02fb3f4f6529c6bc2ae18169eb84f427399122a156 |
|
MD5 | edef065d376de6907c2482100989d010 |
|
BLAKE2b-256 | a9f1e1cb3b61809336d82418190c1ed92eeaf3a23f23203ea8c4499d161a6984 |