debian: add snippet with settings for templates and json cells

This commit is contained in:
Frédéric Péters 2017-08-29 14:10:50 +02:00
parent e8a3b691e8
commit 53f1dbf5d3
2 changed files with 274 additions and 0 deletions

273
debian/50gnm.py vendored Normal file
View File

@ -0,0 +1,273 @@
# -*- coding: utf-8 -*-
COMBO_MAP_TILE_URLTEMPLATE = "https://carton.entrouvert.org/hydda-tiles/{z}/{x}/{y}{r}.png"
COMBO_MAP_ATTRIBUTION = "&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>"
COMBO_DASHBOARD_ENABLED = True
COMBO_PUBLIC_TEMPLATES = {
"standard": {
"name": "Blanc",
"template": "combo/page_template_blank.html",
"placeholders": {
"content": {
"name": "Contenu"
}
}
},
"dashboard": {
"name": "Tableau de bord",
"template": "combo/page_template_dashboard.html",
"placeholders": {
"content": {
"name": "Contenu"
},
"sidebar": {
"name": "Barre latérale"
}
}
},
"iconbar": {
"name": "Barre d'icônes",
"template": "combo/page_template_iconbar.html",
"placeholders": {
"content": {
"name": "Contenu"
},
"sidebar": {
"name": "Barre latérale"
}
}
},
"iconbar-left-sidebar": {
"name": "Barre d'icônes + barre à gauche",
"template": "combo/page_template_iconbar_left_sidebar.html",
"placeholders": {
"content": {
"name": "Contenu"
},
"sidebar": {
"name": "Barre latérale"
}
}
},
"mapsearch": {
"name": "Carte avec recherche",
"template": "combo/page_template_mapsearch.html",
"placeholders": {
"content": {
"name": "Contenu"
}
}
},
"search": {
"name": "Recherche",
"template": "combo/page_template_search.html",
"placeholders": {
"content": {
"name": "Contenu"
},
"sidebar": {
"name": "Barre latérale"
},
"search": {
"name": "Zone de recherche"
}
}
},
"place": {
"name": "Lieu",
"template": "combo/page_template_place.html",
"placeholders": {
"content": {
"name": "Contenu"
}
}
},
}
JSON_CELL_TYPES = {
"velov": {
"url": "https://download.data.grandlyon.com/ws/rdata/jcd_jcdecaux.jcdvelov/all.json?field=gid&value=[gid]",
"name": "Velov",
"cache_duration": 60,
"force_async": False,
"form": [
{
"varname": "gid",
"type": "string",
"label": "GID de la station"
}
]
},
"taxi": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvostationtaxi&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter>",
"name": "Station de taxi",
"cache_duration": 86400,
"force_async": False,
"form": [
{
"varname": "gid",
"type": "string",
"label": "GID de la station"
}
]
},
"mdr": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&maxfeatures=30&request=GetFeature&typename=ter_territoire.maison_du_rhone&SRSNAME=urn:ogc:def:crs:EPSG::4326&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Maison de la Métropole de Lyon",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"piscine": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&maxfeatures=30&request=GetFeature&typename=adr_voie_lieu.adrequippiscinepct&SRSNAME=urn:ogc:def:crs:EPSG::4326&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Piscine de la Métropole de Lyon",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"mairie": {
"url": "[passerelle_url]csvdatasource/mairies/data?identifiant=[identifiant]",
"cache_duration": 86400,
"force_async": False,
"name": "Mairie",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"decheterie": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=gip_proprete.gipdecheterie&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Déchèterie",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"donnerie": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=gip_proprete.gipdonnerie&SRSNAME=urn:ogc:def:crs:EPSG::4326filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Donnerie",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"bibliotheque": {
"url": "https://download.data.grandlyon.com/wfs/rdata?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=sit_sitra.sittourisme&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Bibliothèque",
"form": [
{
"varname": "gid",
"type": "string",
"label": "Identifiant"
}
]
},
"aire-de-covoiturage": {
"url": "https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvoparking&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter>",
"cache_duration": 86400,
"force_async": False,
"name": "Aire de covoiturage",
"form": [
{
"varname": "gid",
"type": "string",
"label": "Identifiant"
}
]
},
"airquality": {
"url": "[passerelle_url]airquality/atmo/details/fr/lyon/",
"cache_duration": 86400,
"force_async": False,
"name": "Qualité de l'air"
},
"pollen": {
"url": "https://download.data.grandlyon.com/ws/rdata/rnsa_reseau_aerobio.rnsabulletin/all.json?field=type&value=Synthese",
"cache_duration": 86400,
"force_async": False,
"name": "Info Pollen"
},
"places": {
"url": "[passerelle_url]jsondatastore/lieux-favoris/data/?name_id=[user_nameid]",
"name": "Lieux favoris",
"force_async": False,
"cache_duration": 600,
"actions": {
"create": {
"url": "[passerelle_url]jsondatastore/lieux-favoris/data/create?name_id=[user_nameid]"
},
"delete": {
"url": "[passerelle_url]jsondatastore/lieux-favoris/data/[id]/delete?name_id=[user_nameid]"
}
}
},
"silo-a-verre": {
"url": "https://download.data.grandlyon.com/ws/grandlyon/gic_collecte.gicsiloverre/all.json?field=identifiant&value=[identifiant]",
"cache_duration": 86400,
"force_async": False,
"name": "Silo à verre",
"form": [
{
"varname": "identifiant",
"type": "string",
"label": "Identifiant"
}
]
},
"tcl": {
"url": "[passerelle_url]tcl/tcl/stop/[id]",
"ajax_refresh": 25,
"cache_duration": 10,
"force_async": False,
"name": "Arrêt TCL",
"form": [
{
"varname": "id",
"type": "string",
"label": "Identifiant"
}
]
},
"goto": {
"url": "http://preprod.tsvc.optimod2.cityway.fr:80/api/journeyplanner/opt/PlanTrips/json?DepartureType=COORDINATES&DepartureLatitude=[lat1]&DepartureLongitude=[lng1]&ArrivalType=COORDINATES&ArrivalLatitude=[lat2]&ArrivalLongitude=[lng2]&Date=[date]&DateType=DEPARTURE&Algorithm=MINCHANGES&TripModes=[tripmode]&user_key=1fd5db9effbb01c36424ef76463cdda0",
"cache_duration": 60,
"force_async": False,
"name": "M'y rendre",
"varnames": ["lat1", "lng1", "lat2", "lng2", "date"],
"form": [
{
"varname": "tripmode",
"type": "string",
"label": "Mode de transport (WALK, BIKE, PT, CAR)"
}
]
}
}

View File

@ -0,0 +1 @@
debian/50gnm.py /etc/combo/settings.d/