settings: grab geoloc of favorite place (#26264)

This commit is contained in:
Frédéric Péters 2018-09-13 08:28:59 +02:00
parent d4d7a2aa3e
commit 5dcc1696a9
1 changed files with 13 additions and 1 deletions

14
debian/50gnm.py vendored
View File

@ -212,8 +212,20 @@ JSON_CELL_TYPES = {
{
"key": "places",
"url": "{% if user_nameid %}{{ passerelle_url }}jsondatastore/lieux-favoris/data/?name_id={{user_nameid}}{% endif %}",
},
{
"key": "place_geoloc",
"url": "{% if places %}{{ passerelle_url }}base-adresse/nominatim/search?q={{ places.data.0.text }}&format=json{% endif %}",
"cache_duration": 3600,
},
],
"actions": {
"geocode": {
"url": "{{ passerelle_url }}base-adresse/nominatim/search?q={{ q }}&format=json",
"method": "get",
"response": "raw"
}
]
}
},
"pollen": {
"url": "https://download.data.grandlyon.com/ws/rdata/rnsa_reseau_aerobio.rnsabulletin/all.json",