variable |
@@ -361,29 +362,33 @@ $ make upgrade-db
REACT_APP_THUNDERFOREST_API_KEY
|
ThunderForest API key |
-(deprecated, use TILE_SERVER_URL instead) |
+(deprecated in 0.x.x, use TILE_SERVER_URL and MAP_ATTRIBUTION instead) |
TILE_SERVER_URL
|
Tile server URL (with api key if needed) |
https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
|
-UI_URL
|
+
MAP_ATTRIBUTION
|
+Map attribution (if using another tile server) |
+© <a href="http://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">OpenStreetMap</a> contributors
|
+
+UI_URL
|
application URL |
no default value, must be initialized |
-EMAIL_URL
|
+
EMAIL_URL
|
email URL with credentials |
no default value, must be initialized (see below) |
-SENDER_EMAIL
|
+
SENDER_EMAIL
|
application sender email address |
no default value, must be initialized |
-REDIS_URL
|
+
REDIS_URL
|
Redis instance used by Dramatiq |
local Redis instance |
-WORKERS_PROCESSES
|
+
WORKERS_PROCESSES
|
number of process used by Dramatiq |
no default value, must be initialized |
@@ -396,6 +401,7 @@ Related environment variables are needed to initialize database.
Emails
+
new in 0.3.0
To send emails, a valid EMAIL_URL
must be provided:
+
+
Map tile server
+
new in 0.x.x
+
Default tile server is now OpenStreetMapβs standard tile layer (if environment variables are not initialized).
+The tile server can be changed by updating TILE_SERVER_URL
and MAP_ATTRIBUTION
variables (list of tile servers).
+
To keep using ThunderForest Outdoors, the configuration is:
+
+TILE_SERVER_URL=https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=XXXX
where XXXX is ThunderForest API key
+MAP_ATTRIBUTION=© <a href="http://www.thunderforest.com/">Thunderforest</a>, © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors
+
+
+
Note
+
Check the terms of service of tile provider for map attribution
+
+
diff --git a/docs/searchindex.js b/docs/searchindex.js
index d1bedacb..9236ccf7 100644
--- a/docs/searchindex.js
+++ b/docs/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["api/activities","api/auth","api/configuration","api/index","api/records","api/sports","api/stats","api/users","changelog","features","index","installation","troubleshooting/administrator","troubleshooting/index","troubleshooting/user"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["api/activities.rst","api/auth.rst","api/configuration.rst","api/index.rst","api/records.rst","api/sports.rst","api/stats.rst","api/users.rst","changelog.md","features.rst","index.rst","installation.rst","troubleshooting/administrator.rst","troubleshooting/index.rst","troubleshooting/user.rst"],objects:{"":{"/api/activities":[0,1,1,"post--api-activities"],"/api/activities/(int:activity_id)":[0,3,1,"patch--api-activities-(int-activity_id)"],"/api/activities/(int:activity_id)/chart_data":[0,0,1,"get--api-activities-(int-activity_id)-chart_data"],"/api/activities/(int:activity_id)/chart_data/segment/(int:segment_id)":[0,0,1,"get--api-activities-(int-activity_id)-chart_data-segment-(int-segment_id)"],"/api/activities/(int:activity_id)/gpx":[0,0,1,"get--api-activities-(int-activity_id)-gpx"],"/api/activities/(int:activity_id)/gpx/segment/(int:segment_id)":[0,0,1,"get--api-activities-(int-activity_id)-gpx-segment-(int-segment_id)"],"/api/activities/map/(map_id)":[0,0,1,"get--api-activities-map-(map_id)"],"/api/activities/no_gpx":[0,1,1,"post--api-activities-no_gpx"],"/api/auth/login":[1,1,1,"post--api-auth-login"],"/api/auth/logout":[1,0,1,"get--api-auth-logout"],"/api/auth/password/reset-request":[1,1,1,"post--api-auth-password-reset-request"],"/api/auth/password/update":[1,1,1,"post--api-auth-password-update"],"/api/auth/picture":[1,1,1,"post--api-auth-picture"],"/api/auth/profile":[1,0,1,"get--api-auth-profile"],"/api/auth/profile/edit":[1,1,1,"post--api-auth-profile-edit"],"/api/auth/register":[1,1,1,"post--api-auth-register"],"/api/config":[2,3,1,"patch--api-config"],"/api/ping":[2,0,1,"get--api-ping"],"/api/records":[4,0,1,"get--api-records"],"/api/sports":[5,0,1,"get--api-sports"],"/api/sports/(int:sport_id)":[5,3,1,"patch--api-sports-(int-sport_id)"],"/api/stats/(user_name)/by_sport":[6,0,1,"get--api-stats-(user_name)-by_sport"],"/api/stats/(user_name)/by_time":[6,0,1,"get--api-stats-(user_name)-by_time"],"/api/stats/all":[6,0,1,"get--api-stats-all"],"/api/users":[7,0,1,"get--api-users"],"/api/users/(user_name)":[7,3,1,"patch--api-users-(user_name)"],"/api/users/(user_name)/picture":[7,0,1,"get--api-users-(user_name)-picture"]},"/api/activities/map_tile/(s)/(z)/(x)/(y)":{png:[0,0,1,"get--api-activities-map_tile-(s)-(z)-(x)-(y).png"]}},objnames:{"0":["http","get","HTTP get"],"1":["http","post","HTTP post"],"2":["http","delete","HTTP delete"],"3":["http","patch","HTTP patch"]},objtypes:{"0":"http:get","1":"http:post","2":"http:delete","3":"http:patch"},terms:{"0mb":[0,1],"1000":6,"1048576":2,"10485760":2,"10mb":11,"1232004":0,"12341":6,"1234538":0,"1267":6,"1563529507772":0,"1mb":11,"200":[0,1,2,4,5,6,7],"201":[0,1],"2017":[0,6],"2018":[0,6,10],"2019":[0,1,4,6,7,10],"2020":10,"204":[0,1,7],"279":0,"280":0,"282":6,"2930":0,"2e1ee2c":8,"3000":[11,12],"34614d5":8,"400":[0,1,2,5],"401":[0,1,2,4,5,6,7],"403":[0,1,2,5,6,7],"404":[0,1,5,6,7],"4109":0,"413":[0,1],"465":11,"4c3fc34":8,"500":[0,1,2,5,7],"5078118":0,"5079733":0,"587":11,"613":6,"7380":0,"895":[1,7],"9960":6,"boolean":[2,7],"default":[0,6,7,11],"export":10,"float":0,"int":[0,5],"null":[0,1,7],"return":[0,4],"static":11,"true":[1,2,5,7,11],"try":[0,1,7],For:11,NOT:[0,1,5],Not:[0,1,5,6,7],That:1,The:[8,9,11],Use:8,accord:10,account:[7,8],acit:0,activ:[3,5,6,8,10],activities_count:7,activity_d:[0,4],activity_id:[0,4],adapt:11,add:[7,8,9,10],address:11,admin:[0,1,2,4,5,6,7,8,11],administr:[0,1,7,10,13],again:[0,1,2,4,5,6,7],all:[4,5,6,7,11],allow:[0,1,2,10,11],along:0,alpinequest:10,alreadi:1,also:10,android:10,anoth:7,anymor:8,apach:10,api:[0,1,2,4,5,6,7,8,9,10,11,12],app:[10,11],applic:[0,1,2,4,5,6,7,8,9,10,11],arch:11,archiv:[2,9,11],archlinux:11,asc:7,ascent:0,auth:[0,1,2,4,5,6,7],auth_token:1,auth_user_id:[0,2,4,5,6,7],authent:[0,2,3,4,5,6,7,10],author:[0,1,2,4,5,6,7],avail:[4,9,10],ave_spe:0,ave_speed_from:0,ave_speed_to:0,averag:[0,4,8,9],axi:0,b862a77:8,background:8,backup:11,bad:[0,1,2,5],bearer:[0,1,2,4,5,6,7],befor:11,below:11,beta:11,bike:[0,5,8,9],bio:[1,7],biographi:1,birth:1,birth_dat:[1,7],bound:0,build:11,by_sport:6,by_tim:6,calcul:8,calendar:[8,9],can:[7,8,9,10,11],cannot:8,chang:[9,10,11],charact:[1,13],chart:[0,8,9,11],chart_data:0,check:[2,12],choos:8,client:[8,11,12],clone:11,code:[0,1,2,4,5,6,7],color:8,column:13,com:[1,7,11],complet:8,config:[2,11,12],configur:[3,10],confirm:1,contact:[0,1,7],contain:8,content:[0,1,2,4,5,6,7],coordin:11,copi:11,correctli:[8,12],creat:[0,1,8,9],created_at:[1,7],creation:[8,9],creation_d:0,credenti:[1,11],criteria:7,current:8,custom:[11,12],cycl:[5,8,9],dai:8,dark:11,darkski:[8,9],dashboard:[8,10],data:[0,1,2,4,5,6,7,8,10,11,13],databas:[8,11],date:[0,1,6,8,9],debian:11,defin:[9,11],definit:8,delet:[0,1,7,8,9],depend:8,deprec:11,desc:0,descent:0,describ:11,descript:11,detail:[7,8,10],develop:10,differ:8,directori:11,disabl:[1,8,9],displai:[0,8,9,10,11],distanc:[0,4,8,9],distance_from:0,distance_to:0,document:[8,10,11],doe:[0,1,6,7,8],don:1,down:8,download:11,dramatiq:11,drop:8,durat:[0,4,8,9],duration_from:0,duration_to:0,dure:[0,1],edit:[1,8,9],elev:[0,8,9,11],email:[1,7,8],email_url:11,empti:8,enabl:[2,9],encount:11,end:[0,6],endpoint:[2,3,13],english:9,enter:[8,9],entiti:[0,1],environ:[8,10],environn:12,error:[0,1,2,5,7,8],europ:[1,7],even:[8,9],exampl:[0,1,2,4,5,6,7,10,11,12],exce:[0,1],except:7,exist:[0,1,6,7,9,10,12],exodu:10,expir:[0,1,2,4,5,6,7],extens:[0,1],fa33f4d996844a5c73ecd1ae24456ab8:0,fals:[0,1,2,5,7],farest:[4,8,9],featur:10,fetch:11,file:[0,1,2,8,9,10,11,12],filter:[8,9],first:[1,10],first_nam:[1,7],fitotrack:10,fittracke:[9,11],fittrackee_api:11,fix:10,flask:11,flaticon:11,follow:[4,9,11],forbidden:[0,1,2,5,6,7],forecast:11,form:[0,1],format:[0,1,6],former:11,forrunn:10,found:[0,1,5,6,7],frame:6,freepik:11,french:[9,10],fri:0,from:[0,2,4,5,6,7,8,10,11],gener:11,get:[0,1,2,4,5,6,7],gif:1,git:11,github:11,gmt:[0,1,4,7],gpl:10,gpx:[0,8,9,10,11],gpx_limit_import:2,gpxpy:11,handl:1,has:7,has_act:5,have:[0,2,5,6,7,8],header:[0,1,2,4,5,6,7],health:2,hike:[5,8,9],his:[7,8,9],http:[0,1,2,4,5,6,7,11,12],i18n:8,icon:11,imag:[0,1,7,11],img:5,improv:10,incorrect:8,index:0,info:1,inform:[8,10],initi:[11,12],instal:[8,10],instanc:[2,11],instead:11,integ:[0,2,4,5,6,7],integr:2,interceptor:8,intern:[0,1,2,5,7],introduc:8,invalid:[0,1,2,4,5,6,7],is_act:5,is_registration_en:2,issu:[10,11],jan:0,javascript:11,john_do:7,jpeg:7,jpg:1,json:[0,1,2,4,5,6,7,13],jul:[0,1,4,7],keep:10,kei:[8,9,11],label:5,languag:[1,7],larg:[0,1],last:[1,11],last_nam:[1,7],latitud:0,leaflet:[0,11],least:0,licens:10,limit:[8,9],line:13,linux:11,list:[8,10],load:8,local:[8,10,11],localhost:[11,12],locat:[1,7],log:[0,1,2,4,5,6,7,10,11],login:[1,11],logout:[1,8],longest:[4,8,9],longitud:0,made:[11,12],mai:11,major:8,make:11,makefil:[11,12],manag:8,mandatori:[0,8,11],map:[0,8,9,10,11],map_id:0,map_til:0,match:1,max:[0,2,7,11],max_alt:0,max_single_file_s:2,max_spe:0,max_speed_from:0,max_speed_to:0,max_us:2,max_zip_file_s:2,maxim:0,maximum:[4,8,9],mean:12,messag:[0,1,2],min_alt:0,minim:0,minor:10,mobil:10,modifi:7,modification_d:0,mon:0,mondai:[1,6,9],montain:[8,9],month:[6,8,9],more:[8,10],morn:0,mountain:5,mous:8,move:[0,8],mpwoadmin:11,multipart:[0,1],must:[1,2,5,8,9,11],name:[1,6,7],nb_activ:[1,6,7],nb_sport:[1,7],necessari:11,need:11,network:12,next_act:0,no_gpx:0,non:5,note:[0,8,9,11],now:[8,9,11],number:[0,2,7,9,11],oauth:[0,1,2,4,5,6,7],object:[0,1,2,5,7],one:[0,7],onli:[0,7,8,9],open:[10,11],openstreetmap:11,opentrack:10,option:11,order:[0,7,8],order_bi:7,org:11,other:[7,11],out:1,outdoor:10,over:8,own:[7,10],owner:[8,9],packag:[8,11],page:[0,7],pagin:[0,7],par_pag:7,paramet:[0,1,2,4,5,6,7,8,9,11],pari:[1,7],pars:[11,13],part:[0,1],password:[1,8,9,11],password_conf:1,past:11,patch:[0,2,5,7],paus:[0,8],payload:[0,1,2,5],per:[0,7],per_pag:[0,7],permiss:[0,2,5,6,7],pg_dump:11,pictur:[0,1,7,11],ping:2,pipenv:8,pleas:[0,1,2,4,5,6,7],png:[0,1,5,11],poetri:[8,11],point:8,pong:2,possibl:10,post:[0,1],postgresql:11,prefer:1,prerequisit:10,previous_act:0,privai:10,process:[1,11],product:[10,11],profil:1,project:11,proprietari:10,provid:[0,1,2,4,5,6,7,8,9,11],pull:11,python:[8,11],queri:[0,6,7],queue:11,react:11,react_app_allow_registr:11,react_app_api_url:[11,12],react_app_gpx_limit_import:11,react_app_max_single_file_s:11,react_app_max_zip_file_s:11,react_app_thunderforest_api_kei:11,readi:[10,11],rebuild:12,rechart:[0,11],record:[0,3,8,9,10],record_typ:[0,4],redi:[8,11],redis_url:11,redux:11,regist:[1,2,11],registr:[1,2,8,9],relat:11,releas:[10,11],remov:9,replac:8,repo:11,report:10,repositori:11,request:[0,1,2,4,5,6,7,12],requir:1,reset:[1,8,9],respons:[0,1,2,4,5,6,7],restart:11,right:[7,9],rout:8,run:[5,8,9,11],runner:10,sam:[1,7],same:8,samr1:11,sat:7,save:9,search:8,second:0,see:[8,9,10,11,12],segment:[0,8,9],segment_id:0,select:[0,1],send:[8,11],sender:11,sender_email:11,serv:11,server:[0,1,2,5,7,10,11],set:9,sever:10,show:8,side:8,signatur:[0,1,2,4,5,6,7],simplifi:8,sinc:11,singl:[2,7],size:[0,1,2,8,9,11],sky:11,smtp:11,some:[0,7,8,11],sorri:1,sort:[0,7],speed:[0,4,8,9,11],spinner:8,sport:[0,3,6,8,9,10,11],sport_id:[0,4,5,6],sports_list:[1,7],ssl:11,standard:8,start:[0,1,6,9,11],starttl:11,stat:[6,8],staticmap:11,statist:[3,10],statu:[0,1,2,4,5,6,7],step:11,still:10,stop:11,store:[10,11],street:10,string:[0,1,5,6,7],subdomain:0,success:[0,1,2,4,5,6,7],successfulli:1,sun:[0,1,4,7],sundai:[0,6,9],support:[8,9],system:11,tab:12,tar:11,task:11,test:11,than:8,them:10,thi:[0,8,9,10,11],thunderforest:11,tile:[0,11],tile_server_url:11,time:[0,1,6,8,9],timezon:[1,7,8],titl:0,tls:11,todo:[11,14],token:[0,1,2,4,5,6,7],too:[0,1],tooltip:8,total:8,total_dist:[1,6,7],total_dur:[1,6,7],track:10,tracker:10,transport:[5,8,9],troubleshoot:10,type:[0,1,2,4,5,6,7],ui_url:11,unauthor:[0,1,2,4,5,6,7],undefin:12,under:10,unencrypt:11,unexpect:13,updat:[0,1,2,5,7,8,9,11],upgrad:10,upload:[8,9,11],uploads_dir_s:6,url:[8,11],use:11,used:11,user:[0,1,2,3,4,5,6,8,9,10,11,13],user_nam:[6,7],usernam:[1,7,11],usernanm:1,using:[0,7,10],valid:[0,1,2,4,5,6,7,11],valu:[0,4,11],variabl:[8,10,12],version:[10,11],view:8,virtualenv:11,walk:[5,8,9],warn:8,weather:[8,9,11],weather_end:0,weather_start:0,web:[0,1,2,4,5,6,7,10],week:[1,6,8,9],weekend:8,weekm:[1,6],were:8,wget:11,when:8,which:9,with_gpx:0,without:[0,6,7,8,9,10],worker:11,workers_process:11,workout:10,written:11,www:11,xzf:11,yai:11,yarn:11,year:6,yet:[10,11],you:[0,2,5,6,7,10],your:[7,10],zip:[0,2,9,11],zone:1,zoom:0},titles:["Activities","Authentication","Configuration","API documentation","Records","Sports","Statistics","Users","Change log","Features","FitTrackee","Installation","Administrator","Troubleshooting","User"],titleterms:{"2018":8,"2019":8,"2020":8,"new":8,account:9,activ:[0,9],administr:[8,9,12],api:3,authent:1,avail:8,bug:8,chang:8,charact:12,close:8,column:12,configur:2,content:10,dashboard:9,data:12,detail:9,dev:11,document:3,email:11,environ:11,featur:[8,9],first:8,fittracke:[8,10],fix:8,french:8,improv:8,instal:11,issu:8,json:12,line:12,list:9,log:8,minor:8,misc:8,pars:12,prerequisit:11,prod:11,record:4,releas:8,sport:5,statist:[6,8,9],tabl:10,translat:9,troubleshoot:13,unexpect:12,upgrad:11,user:[7,14],variabl:11,version:8,workout:9}})
\ No newline at end of file
+Search.setIndex({docnames:["api/activities","api/auth","api/configuration","api/index","api/records","api/sports","api/stats","api/users","changelog","features","index","installation","troubleshooting/administrator","troubleshooting/index","troubleshooting/user"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["api/activities.rst","api/auth.rst","api/configuration.rst","api/index.rst","api/records.rst","api/sports.rst","api/stats.rst","api/users.rst","changelog.md","features.rst","index.rst","installation.rst","troubleshooting/administrator.rst","troubleshooting/index.rst","troubleshooting/user.rst"],objects:{"":{"/api/activities":[0,1,1,"post--api-activities"],"/api/activities/(int:activity_id)":[0,3,1,"patch--api-activities-(int-activity_id)"],"/api/activities/(int:activity_id)/chart_data":[0,0,1,"get--api-activities-(int-activity_id)-chart_data"],"/api/activities/(int:activity_id)/chart_data/segment/(int:segment_id)":[0,0,1,"get--api-activities-(int-activity_id)-chart_data-segment-(int-segment_id)"],"/api/activities/(int:activity_id)/gpx":[0,0,1,"get--api-activities-(int-activity_id)-gpx"],"/api/activities/(int:activity_id)/gpx/segment/(int:segment_id)":[0,0,1,"get--api-activities-(int-activity_id)-gpx-segment-(int-segment_id)"],"/api/activities/map/(map_id)":[0,0,1,"get--api-activities-map-(map_id)"],"/api/activities/no_gpx":[0,1,1,"post--api-activities-no_gpx"],"/api/auth/login":[1,1,1,"post--api-auth-login"],"/api/auth/logout":[1,0,1,"get--api-auth-logout"],"/api/auth/password/reset-request":[1,1,1,"post--api-auth-password-reset-request"],"/api/auth/password/update":[1,1,1,"post--api-auth-password-update"],"/api/auth/picture":[1,1,1,"post--api-auth-picture"],"/api/auth/profile":[1,0,1,"get--api-auth-profile"],"/api/auth/profile/edit":[1,1,1,"post--api-auth-profile-edit"],"/api/auth/register":[1,1,1,"post--api-auth-register"],"/api/config":[2,3,1,"patch--api-config"],"/api/ping":[2,0,1,"get--api-ping"],"/api/records":[4,0,1,"get--api-records"],"/api/sports":[5,0,1,"get--api-sports"],"/api/sports/(int:sport_id)":[5,3,1,"patch--api-sports-(int-sport_id)"],"/api/stats/(user_name)/by_sport":[6,0,1,"get--api-stats-(user_name)-by_sport"],"/api/stats/(user_name)/by_time":[6,0,1,"get--api-stats-(user_name)-by_time"],"/api/stats/all":[6,0,1,"get--api-stats-all"],"/api/users":[7,0,1,"get--api-users"],"/api/users/(user_name)":[7,3,1,"patch--api-users-(user_name)"],"/api/users/(user_name)/picture":[7,0,1,"get--api-users-(user_name)-picture"]},"/api/activities/map_tile/(s)/(z)/(x)/(y)":{png:[0,0,1,"get--api-activities-map_tile-(s)-(z)-(x)-(y).png"]}},objnames:{"0":["http","get","HTTP get"],"1":["http","post","HTTP post"],"2":["http","delete","HTTP delete"],"3":["http","patch","HTTP patch"]},objtypes:{"0":"http:get","1":"http:post","2":"http:delete","3":"http:patch"},terms:{"0mb":[0,1],"1000":6,"1048576":2,"10485760":2,"10mb":11,"1232004":0,"12341":6,"1234538":0,"1267":6,"1563529507772":0,"1mb":11,"200":[0,1,2,4,5,6,7],"201":[0,1],"2017":[0,6],"2018":[0,6,10],"2019":[0,1,4,6,7,10],"2020":10,"204":[0,1,7],"279":0,"280":0,"282":6,"2930":0,"2e1ee2c":8,"3000":[11,12],"34614d5":8,"400":[0,1,2,5],"401":[0,1,2,4,5,6,7],"403":[0,1,2,5,6,7],"404":[0,1,5,6,7],"4109":0,"413":[0,1],"465":11,"4c3fc34":8,"500":[0,1,2,5,7],"5078118":0,"5079733":0,"587":11,"613":6,"7380":0,"895":[1,7],"9960":6,"boolean":[2,7],"default":[0,6,7,11],"export":10,"float":0,"int":[0,5],"new":11,"null":[0,1,7],"return":[0,4],"static":11,"true":[1,2,5,7,11],"try":[0,1,7],For:11,NOT:[0,1,5],Not:[0,1,5,6,7],That:1,The:[8,9,11],Use:8,_blank:11,accord:10,account:[7,8],acit:0,activ:[3,5,6,8,10],activities_count:7,activity_d:[0,4],activity_id:[0,4],adapt:11,add:[7,8,9,10],address:11,admin:[0,1,2,4,5,6,7,8,11],administr:[0,1,7,10,13],again:[0,1,2,4,5,6,7],all:[4,5,6,7,11],allow:[0,1,2,10,11],along:0,alpinequest:10,alreadi:1,also:10,android:10,anoth:[7,11],anymor:8,apach:10,api:[0,1,2,4,5,6,7,8,9,10,11,12],apikei:11,app:[10,11],applic:[0,1,2,4,5,6,7,8,9,10,11],arch:11,archiv:[2,9,11],archlinux:11,asc:7,ascent:0,attribut:11,auth:[0,1,2,4,5,6,7],auth_token:1,auth_user_id:[0,2,4,5,6,7],authent:[0,2,3,4,5,6,7,10],author:[0,1,2,4,5,6,7],avail:[4,9,10],ave_spe:0,ave_speed_from:0,ave_speed_to:0,averag:[0,4,8,9],axi:0,b862a77:8,background:8,backup:11,bad:[0,1,2,5],bearer:[0,1,2,4,5,6,7],befor:11,below:11,beta:11,bike:[0,5,8,9],bio:[1,7],biographi:1,birth:1,birth_dat:[1,7],bound:0,build:11,by_sport:6,by_tim:6,calcul:8,calendar:[8,9],can:[7,8,9,10,11],cannot:8,chang:[9,10,11],charact:[1,13],chart:[0,8,9,11],chart_data:0,check:[2,11,12],choos:8,client:[8,11,12],clone:11,code:[0,1,2,4,5,6,7],color:8,column:13,com:[1,7,11],complet:8,config:[2,11,12],configur:[3,10,11],confirm:1,contact:[0,1,7],contain:8,content:[0,1,2,4,5,6,7],contributor:11,coordin:11,copi:11,copyright:11,correctli:[8,12],creat:[0,1,8,9],created_at:[1,7],creation:[8,9],creation_d:0,credenti:[1,11],criteria:7,current:8,custom:[11,12],cycl:[5,8,9],dai:8,dark:11,darkski:[8,9],dashboard:[8,10],data:[0,1,2,4,5,6,7,8,10,11,13],databas:[8,11],date:[0,1,6,8,9],debian:11,defin:[9,11],definit:8,delet:[0,1,7,8,9],depend:8,deprec:11,desc:0,descent:0,describ:11,descript:11,detail:[7,8,10],develop:10,differ:8,directori:11,disabl:[1,8,9],displai:[0,8,9,10,11],distanc:[0,4,8,9],distance_from:0,distance_to:0,document:[8,10,11],doe:[0,1,6,7,8],don:1,down:8,download:11,dramatiq:11,drop:8,durat:[0,4,8,9],duration_from:0,duration_to:0,dure:[0,1],edit:[1,8,9],elev:[0,8,9,11],email:[1,7,8],email_url:11,empti:8,enabl:[2,9],encount:11,end:[0,6],endpoint:[2,3,13],english:9,enter:[8,9],entiti:[0,1],environ:[8,10],environn:12,error:[0,1,2,5,7,8],europ:[1,7],even:[8,9],exampl:[0,1,2,4,5,6,7,10,11,12],exce:[0,1],except:7,exist:[0,1,6,7,9,10,12],exodu:10,expir:[0,1,2,4,5,6,7],extens:[0,1],fa33f4d996844a5c73ecd1ae24456ab8:0,fals:[0,1,2,5,7],farest:[4,8,9],featur:10,fetch:11,file:[0,1,2,8,9,10,11,12],filter:[8,9],first:[1,10],first_nam:[1,7],fitotrack:10,fittracke:[9,11],fittrackee_api:11,fix:10,flask:11,flaticon:11,follow:[4,9,11],forbidden:[0,1,2,5,6,7],forecast:11,form:[0,1],format:[0,1,6],former:11,forrunn:10,found:[0,1,5,6,7],frame:6,freepik:11,french:[9,10],fri:0,from:[0,2,4,5,6,7,8,10,11],gener:11,get:[0,1,2,4,5,6,7],gif:1,git:11,github:11,gmt:[0,1,4,7],gpl:10,gpx:[0,8,9,10,11],gpx_limit_import:2,gpxpy:11,handl:1,has:7,has_act:5,have:[0,2,5,6,7,8],header:[0,1,2,4,5,6,7],health:2,hike:[5,8,9],his:[7,8,9],href:11,http:[0,1,2,4,5,6,7,11,12],i18n:8,icon:11,imag:[0,1,7,11],img:5,improv:10,incorrect:8,index:0,info:1,inform:[8,10],initi:[11,12],instal:[8,10],instanc:[2,11],instead:11,integ:[0,2,4,5,6,7],integr:2,interceptor:8,intern:[0,1,2,5,7],introduc:8,invalid:[0,1,2,4,5,6,7],is_act:5,is_registration_en:2,issu:[10,11],jan:0,javascript:11,john_do:7,jpeg:7,jpg:1,json:[0,1,2,4,5,6,7,13],jul:[0,1,4,7],keep:[10,11],kei:[8,9,11],label:5,languag:[1,7],larg:[0,1],last:[1,11],last_nam:[1,7],latitud:0,layer:11,leaflet:[0,11],least:0,licens:10,limit:[8,9],line:13,linux:11,list:[8,10,11],load:8,local:[8,10,11],localhost:[11,12],locat:[1,7],log:[0,1,2,4,5,6,7,10,11],login:[1,11],logout:[1,8],longest:[4,8,9],longitud:0,made:[11,12],mai:11,major:8,make:11,makefil:[11,12],manag:8,mandatori:[0,8,11],map:[0,8,9,10],map_attribut:11,map_id:0,map_til:0,match:1,max:[0,2,7,11],max_alt:0,max_single_file_s:2,max_spe:0,max_speed_from:0,max_speed_to:0,max_us:2,max_zip_file_s:2,maxim:0,maximum:[4,8,9],mean:12,messag:[0,1,2],min_alt:0,minim:0,minor:10,mobil:10,modifi:7,modification_d:0,mon:0,mondai:[1,6,9],montain:[8,9],month:[6,8,9],more:[8,10],morn:0,mountain:5,mous:8,move:[0,8],mpwoadmin:11,multipart:[0,1],must:[1,2,5,8,9,11],name:[1,6,7],nb_activ:[1,6,7],nb_sport:[1,7],necessari:11,need:11,network:12,next_act:0,no_gpx:0,non:5,noopen:11,noreferr:11,note:[0,8,9,11],now:[8,9,11],number:[0,2,7,9,11],oauth:[0,1,2,4,5,6,7],object:[0,1,2,5,7],one:[0,7],onli:[0,7,8,9],open:[10,11],openstreetmap:11,opentrack:10,option:11,order:[0,7,8],order_bi:7,org:11,other:[7,11],out:1,outdoor:[10,11],over:8,own:[7,10],owner:[8,9],packag:[8,11],page:[0,7],pagin:[0,7],par_pag:7,paramet:[0,1,2,4,5,6,7,8,9,11],pari:[1,7],pars:[11,13],part:[0,1],password:[1,8,9,11],password_conf:1,past:11,patch:[0,2,5,7],paus:[0,8],payload:[0,1,2,5],per:[0,7],per_pag:[0,7],permiss:[0,2,5,6,7],pg_dump:11,pictur:[0,1,7,11],ping:2,pipenv:8,pleas:[0,1,2,4,5,6,7],png:[0,1,5,11],poetri:[8,11],point:8,pong:2,possibl:10,post:[0,1],postgresql:11,prefer:1,prerequisit:10,previous_act:0,privai:10,process:[1,11],product:[10,11],profil:1,project:11,proprietari:10,provid:[0,1,2,4,5,6,7,8,9,11],pull:11,python:[8,11],queri:[0,6,7],queue:11,react:11,react_app_allow_registr:11,react_app_api_url:[11,12],react_app_gpx_limit_import:11,react_app_max_single_file_s:11,react_app_max_zip_file_s:11,react_app_thunderforest_api_kei:11,readi:[10,11],rebuild:12,rechart:[0,11],record:[0,3,8,9,10],record_typ:[0,4],redi:[8,11],redis_url:11,redux:11,regist:[1,2,11],registr:[1,2,8,9],rel:11,relat:11,releas:[10,11],remov:9,replac:8,repo:11,report:10,repositori:11,request:[0,1,2,4,5,6,7,12],requir:1,reset:[1,8,9],respons:[0,1,2,4,5,6,7],restart:11,right:[7,9],rout:8,run:[5,8,9,11],runner:10,sam:[1,7],same:8,samr1:11,sat:7,save:9,search:8,second:0,see:[8,9,10,11,12],segment:[0,8,9],segment_id:0,select:[0,1],send:[8,11],sender:11,sender_email:11,serv:11,server:[0,1,2,5,7,8,10],servic:11,set:9,sever:10,show:8,side:8,signatur:[0,1,2,4,5,6,7],simplifi:8,sinc:11,singl:[2,7],size:[0,1,2,8,9,11],sky:11,smtp:11,some:[0,7,8,11],sorri:1,sort:[0,7],speed:[0,4,8,9,11],spinner:8,sport:[0,3,6,8,9,10,11],sport_id:[0,4,5,6],sports_list:[1,7],ssl:11,standard:[8,11],start:[0,1,6,9,11],starttl:11,stat:[6,8],staticmap:11,statist:[3,10],statu:[0,1,2,4,5,6,7],step:11,still:10,stop:11,store:[10,11],street:10,string:[0,1,5,6,7],subdomain:0,success:[0,1,2,4,5,6,7],successfulli:1,sun:[0,1,4,7],sundai:[0,6,9],support:[8,9],system:11,tab:12,tar:11,target:11,task:11,term:11,test:11,than:8,them:10,thi:[0,8,9,10,11],thunderforest:11,tile:[0,8],tile_server_url:11,time:[0,1,6,8,9],timezon:[1,7,8],titl:0,tls:11,todo:[11,14],token:[0,1,2,4,5,6,7],too:[0,1],tooltip:8,total:8,total_dist:[1,6,7],total_dur:[1,6,7],track:10,tracker:10,transport:[5,8,9],troubleshoot:10,type:[0,1,2,4,5,6,7],ui_url:11,unauthor:[0,1,2,4,5,6,7],undefin:12,under:10,unencrypt:11,unexpect:13,unreleas:10,updat:[0,1,2,5,7,8,9,11],upgrad:10,upload:[8,9,11],uploads_dir_s:6,url:[8,11],use:11,used:11,user:[0,1,2,3,4,5,6,8,9,10,11,13],user_nam:[6,7],usernam:[1,7,11],usernanm:1,using:[0,7,10,11],valid:[0,1,2,4,5,6,7,11],valu:[0,4,11],variabl:[8,10,12],version:[10,11],view:8,virtualenv:11,walk:[5,8,9],warn:8,wea:8,weather:[8,9,11],weather_end:0,weather_start:0,web:[0,1,2,4,5,6,7,10],week:[1,6,8,9],weekend:8,weekm:[1,6],were:8,wget:11,when:8,where:11,which:9,with_gpx:0,without:[0,6,7,8,9,10],worker:11,workers_process:11,workout:10,written:11,www:11,xxxx:11,xzf:11,yai:11,yarn:11,year:6,yet:[10,11],you:[0,2,5,6,7,10],your:[7,10],zip:[0,2,9,11],zone:1,zoom:0},titles:["Activities","Authentication","Configuration","API documentation","Records","Sports","Statistics","Users","Change log","Features","FitTrackee","Installation","Administrator","Troubleshooting","User"],titleterms:{"2018":8,"2019":8,"2020":8,"new":8,account:9,activ:[0,9],administr:[8,9,12],api:3,authent:1,avail:8,bug:8,chang:8,charact:12,close:8,column:12,configur:2,content:10,dashboard:9,data:12,detail:9,dev:11,document:3,email:11,environ:11,featur:[8,9],first:8,fittracke:[8,10],fix:8,french:8,improv:8,instal:11,issu:8,json:12,line:12,list:9,log:8,map:11,minor:8,misc:8,pars:12,prerequisit:11,prod:11,record:4,releas:8,server:11,sport:5,statist:[6,8,9],tabl:10,tile:11,translat:9,troubleshoot:13,unexpect:12,unreleas:8,upgrad:11,user:[7,14],variabl:11,version:8,workout:9}})
\ No newline at end of file
diff --git a/docsrc/source/installation.rst b/docsrc/source/installation.rst
index 71cb86b4..d0851c74 100644
--- a/docsrc/source/installation.rst
+++ b/docsrc/source/installation.rst
@@ -185,22 +185,23 @@ The following environment variables must be defined in **Makefile.custom.config*
.. cssclass:: table-bordered table-striped
-===================================== ======================================== ====================================
-variable description app default value
-===================================== ======================================== ====================================
-``REACT_APP_API_URL`` Fittrackee API URL no default value, must be initialized
-``REACT_APP_GPX_LIMIT_IMPORT`` max. number of gpx file in zip archive 10 (*deprecated in 0.3.0*)
-``REACT_APP_MAX_SINGLE_FILE_SIZE`` max. size of a gpx or picture file 1MB (*deprecated in 0.3.0*)
-``REACT_APP_MAX_ZIP_FILE_SIZE`` max. size of a zip archive 10MB (*deprecated in 0.3.0*)
-``REACT_APP_ALLOW_REGISTRATION`` allows users to register true (*deprecated in 0.3.0*)
-``REACT_APP_THUNDERFOREST_API_KEY`` ThunderForest API key (*deprecated*, use ``TILE_SERVER_URL`` instead)
-``TILE_SERVER_URL`` Tile server URL (with api key if needed) ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``
-``UI_URL`` application URL no default value, must be initialized
-``EMAIL_URL`` email URL with credentials no default value, must be initialized (see below)
-``SENDER_EMAIL`` application sender email address no default value, must be initialized
-``REDIS_URL`` Redis instance used by Dramatiq local Redis instance
-``WORKERS_PROCESSES`` number of process used by Dramatiq no default value, must be initialized
-===================================== ======================================== ====================================
+===================================== ============================================== ====================================
+variable description app default value
+===================================== ============================================== ====================================
+``REACT_APP_API_URL`` Fittrackee API URL no default value, must be initialized
+``REACT_APP_GPX_LIMIT_IMPORT`` max. number of gpx file in zip archive 10 (*deprecated in 0.3.0*)
+``REACT_APP_MAX_SINGLE_FILE_SIZE`` max. size of a gpx or picture file 1MB (*deprecated in 0.3.0*)
+``REACT_APP_MAX_ZIP_FILE_SIZE`` max. size of a zip archive 10MB (*deprecated in 0.3.0*)
+``REACT_APP_ALLOW_REGISTRATION`` allows users to register true (*deprecated in 0.3.0*)
+``REACT_APP_THUNDERFOREST_API_KEY`` ThunderForest API key (*deprecated in 0.x.x*, use ``TILE_SERVER_URL`` **and** ``MAP_ATTRIBUTION`` instead)
+``TILE_SERVER_URL`` Tile server URL (with api key if needed) ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``
+``MAP_ATTRIBUTION`` Map attribution (if using another tile server) ``© OpenStreetMap contributors``
+``UI_URL`` application URL no default value, must be initialized
+``EMAIL_URL`` email URL with credentials no default value, must be initialized (see below)
+``SENDER_EMAIL`` application sender email address no default value, must be initialized
+``REDIS_URL`` Redis instance used by Dramatiq local Redis instance
+``WORKERS_PROCESSES`` number of process used by Dramatiq no default value, must be initialized
+===================================== ============================================== ====================================
.. warning::
Since FitTrackee 0.3.0, some applications parameters are now stored in database.
@@ -208,9 +209,26 @@ variable description a
Emails
^^^^^^
+*new in 0.3.0*
To send emails, a valid ``EMAIL_URL`` must be provided:
- with an unencrypted SMTP server: ``smtp://username:password@smtp.example.com:25``
- with SSL: ``smtp://username:password@smtp.example.com:465/?ssl=True``
-- with STARTTLS: ``smtp://username:password@smtp.example.com:587/?tls=True``
\ No newline at end of file
+- with STARTTLS: ``smtp://username:password@smtp.example.com:587/?tls=True``
+
+
+Map tile server
+^^^^^^^^^^^^^^^
+*new in 0.x.x*
+
+Default tile server is now **OpenStreetMap**'s standard tile layer (if environment variables are not initialized).
+The tile server can be changed by updating ``TILE_SERVER_URL`` and ``MAP_ATTRIBUTION`` variables (`list of tile servers `__).
+
+To keep using ThunderForest Outdoors, the configuration is:
+
+- ``TILE_SERVER_URL=https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=XXXX`` where **XXXX** is ThunderForest API key
+- ``MAP_ATTRIBUTION=© Thunderforest, © OpenStreetMap contributors``
+
+.. note::
+ Check the terms of service of tile provider for map attribution
\ No newline at end of file
diff --git a/fittrackee_api/fittrackee_api/activities/activities.py b/fittrackee_api/fittrackee_api/activities/activities.py
index e48df7fd..e90c1ffe 100644
--- a/fittrackee_api/fittrackee_api/activities/activities.py
+++ b/fittrackee_api/fittrackee_api/activities/activities.py
@@ -5,15 +5,7 @@ from datetime import datetime, timedelta
import requests
from fittrackee_api import appLog, db
-from flask import (
- Blueprint,
- Response,
- current_app,
- jsonify,
- request,
- send_file,
- stream_with_context,
-)
+from flask import Blueprint, Response, current_app, jsonify, request, send_file
from sqlalchemy import exc
from ..users.utils import (
@@ -754,7 +746,7 @@ def get_map_tile(s, z, x, y):
Status codes are status codes returned by tile server
"""
- url = current_app.config["TILE_SERVER_URL"].format(s=s, z=z, x=x, y=y)
+ url = current_app.config['TILE_SERVER']['URL'].format(s=s, z=z, x=x, y=y)
headers = {'User-Agent': 'Mozilla/5.0'}
response = requests.get(url, headers=headers)
return (
diff --git a/fittrackee_api/fittrackee_api/application/models.py b/fittrackee_api/fittrackee_api/application/models.py
index 5bc63c99..4f2953b3 100644
--- a/fittrackee_api/fittrackee_api/application/models.py
+++ b/fittrackee_api/fittrackee_api/application/models.py
@@ -20,6 +20,10 @@ class AppConfig(db.Model):
nb_users = User.query.count()
return self.max_users == 0 or nb_users < self.max_users
+ @property
+ def map_attribution(self):
+ return current_app.config['TILE_SERVER']['ATTRIBUTION']
+
def serialize(self):
return {
"gpx_limit_import": self.gpx_limit_import,
@@ -27,6 +31,7 @@ class AppConfig(db.Model):
"max_single_file_size": self.max_single_file_size,
"max_zip_file_size": self.max_zip_file_size,
"max_users": self.max_users,
+ "map_attribution": self.map_attribution,
}
diff --git a/fittrackee_api/fittrackee_api/config.py b/fittrackee_api/fittrackee_api/config.py
index eacae825..cf22abec 100644
--- a/fittrackee_api/fittrackee_api/config.py
+++ b/fittrackee_api/fittrackee_api/config.py
@@ -28,9 +28,18 @@ class BaseConfig:
EMAIL_URL = os.environ.get('EMAIL_URL')
SENDER_EMAIL = os.environ.get('SENDER_EMAIL')
DRAMATIQ_BROKER = broker
- TILE_SERVER_URL = os.environ.get(
- 'TILE_SERVER_URL', 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
- )
+ TILE_SERVER = {
+ 'URL': os.environ.get(
+ 'TILE_SERVER_URL',
+ 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
+ ),
+ 'ATTRIBUTION': os.environ.get(
+ 'MAP_ATTRIBUTION',
+ '© OpenStreetMap'
+ ' contributors',
+ ),
+ }
class DevelopmentConfig(BaseConfig):
diff --git a/fittrackee_api/fittrackee_api/tests/conftest.py b/fittrackee_api/fittrackee_api/tests/conftest.py
index 12c55a9b..980397fd 100644
--- a/fittrackee_api/fittrackee_api/tests/conftest.py
+++ b/fittrackee_api/fittrackee_api/tests/conftest.py
@@ -48,6 +48,8 @@ def get_app(with_config=False):
@pytest.fixture
def app(monkeypatch):
monkeypatch.setenv('EMAIL_URL', 'smtp://none:none@0.0.0.0:1025')
+ monkeypatch.delenv('TILE_SERVER_URL')
+ monkeypatch.delenv('MAP_ATTRIBUTION')
yield from get_app(with_config=True)
diff --git a/fittrackee_api/fittrackee_api/tests/test_app_config_api.py b/fittrackee_api/fittrackee_api/tests/test_app_config_api.py
index b50ba5d6..d6f0ba2b 100644
--- a/fittrackee_api/fittrackee_api/tests/test_app_config_api.py
+++ b/fittrackee_api/fittrackee_api/tests/test_app_config_api.py
@@ -26,6 +26,11 @@ class TestGetConfig:
assert data['data']['max_single_file_size'] == 1048576
assert data['data']['max_zip_file_size'] == 10485760
assert data['data']['max_users'] == 100
+ assert data['data']['map_attribution'] == (
+ '© OpenStreetMap '
+ 'contributors'
+ )
def test_it_returns_error_if_application_has_no_config(
self, app_no_config, user_1_admin
diff --git a/fittrackee_api/fittrackee_api/tests/test_app_config_model.py b/fittrackee_api/fittrackee_api/tests/test_app_config_model.py
index 82acbca7..f026c51c 100644
--- a/fittrackee_api/fittrackee_api/tests/test_app_config_model.py
+++ b/fittrackee_api/fittrackee_api/tests/test_app_config_model.py
@@ -12,3 +12,8 @@ class TestConfigModel:
assert serialized_app_config['max_single_file_size'] == 1048576
assert serialized_app_config['max_zip_file_size'] == 10485760
assert serialized_app_config['max_users'] == 100
+ assert serialized_app_config['map_attribution'] == (
+ '© OpenStreetMap '
+ 'contributors'
+ )
diff --git a/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx
index 389cb697..7cae0f26 100644
--- a/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx
+++ b/fittrackee_client/src/components/Activity/ActivityDisplay/ActivityMap.jsx
@@ -44,7 +44,7 @@ class ActivityMap extends React.Component {
}
render() {
- const { activity, coordinates, gpxContent } = this.props
+ const { activity, coordinates, gpxContent, mapAttribution } = this.props
const { jsonData } = getGeoJson(gpxContent)
const bounds = [
[activity.bounds[0], activity.bounds[1]],
@@ -61,9 +61,8 @@ class ActivityMap extends React.Component {
>
({
gpxContent: state.gpx,
+ mapAttribution: state.application.config.map_attribution,
}),
dispatch => ({
loadActivityGpx: activityId => {