2017-08-29 14:10:50 +02:00
# -*- coding: utf-8 -*-
2018-07-04 11:24:26 +02:00
if not ' combo_plugin_gnm ' in INSTALLED_APPS :
INSTALLED_APPS + = ( ' combo_plugin_gnm ' , )
TENANT_APPS + = ( ' combo_plugin_gnm ' , )
2018-07-04 11:23:01 +02:00
MELLON_ADD_AUTHNREQUEST_NEXT_URL_EXTENSION = True
2018-06-12 09:21:58 +02:00
COMBO_MAP_TILE_URLTEMPLATE = " https://tiles.entrouvert.org/hdm/ {z} / {x} / {y} .png "
2017-08-29 14:10:50 +02:00
COMBO_MAP_ATTRIBUTION = " © <a href= ' http://www.openstreetmap.org/copyright ' >OpenStreetMap</a> "
2019-05-26 11:03:29 +02:00
COMBO_GEOCODING_SERVICE = ' https://nominatim.entrouvert.org '
2017-11-20 11:01:49 +01:00
2017-08-29 14:10:50 +02:00
COMBO_DASHBOARD_ENABLED = True
2017-11-20 11:01:49 +01:00
COMBO_DASHBOARD_NEW_TILE_POSITION = ' first '
2017-08-29 14:10:50 +02:00
2017-09-30 14:20:53 +02:00
COMBO_MAP_DEFAULT_POSITION = { ' lat ' : ' 45.7577 ' , ' lng ' : ' 4.8320 ' }
2017-09-30 14:22:16 +02:00
COMBO_MAP_MAX_BOUNDS = {
" corner1 " : { " lat " : 45.9134 , " lng " : 4.6733 } ,
" corner2 " : { " lat " : 45.5583 , " lng " : 5.1574 }
}
2017-09-27 15:14:36 +02:00
2017-08-29 21:50:05 +02:00
COMBO_PUBLIC_TEMPLATES . update ( {
2017-09-14 15:40:17 +02:00
" blank " : {
2017-08-29 16:26:52 +02:00
" name " : u " Blanc " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_blank.html " ,
} ,
" dashboard " : {
2017-08-29 16:26:52 +02:00
" name " : u " Tableau de bord " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_dashboard.html " ,
} ,
" iconbar " : {
2017-08-29 16:26:52 +02:00
" name " : u " Barre d ' icônes " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_iconbar.html " ,
} ,
" iconbar-left-sidebar " : {
2017-08-29 16:26:52 +02:00
" name " : u " Barre d ' icônes + barre à gauche " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_iconbar_left_sidebar.html " ,
} ,
" search " : {
2017-08-29 16:26:52 +02:00
" name " : u " Recherche " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_search.html " ,
} ,
2017-09-25 10:23:25 +02:00
" banner-two-columns " : {
" name " : " Deux colonnes + bandeau " ,
" template " : " combo/page_template_banner_2cols.html " ,
} ,
2017-10-12 16:41:58 +02:00
" banner-one-column " : {
" name " : u " Une colonne + bandeau " ,
" template " : " combo/page_template_banner.html " ,
} ,
2017-09-25 10:23:25 +02:00
" banner-two-columns-sidebar " : {
" name " : u " Deux colonnes et une barre latérale + bandeau " ,
" template " : " combo/page_template_banner_2cols_sidebar.html " ,
} ,
2017-08-29 14:10:50 +02:00
" place " : {
2017-08-29 16:26:52 +02:00
" name " : u " Lieu " ,
2017-08-29 14:10:50 +02:00
" template " : " combo/page_template_place.html " ,
} ,
2018-09-09 17:03:03 +02:00
" goto " : {
" name " : u " M ' y rendre " ,
" template " : " combo/page_template_goto.html " ,
} ,
2017-08-29 21:50:05 +02:00
} )
2017-08-29 14:10:50 +02:00
JSON_CELL_TYPES = {
" velov " : {
" url " : " https://download.data.grandlyon.com/ws/rdata/jcd_jcdecaux.jcdvelov/all.json?field=gid&value=[gid] " ,
2017-08-29 16:26:52 +02:00
" name " : u " Velov " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 60 ,
" force_async " : False ,
2018-01-14 10:44:37 +01:00
" auto_refresh " : 90 ,
2017-08-29 14:10:50 +02:00
" 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> " ,
2017-08-29 16:26:52 +02:00
" name " : u " Station de taxi " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " GID de la station "
}
]
} ,
" mdr " : {
2018-09-04 21:22:58 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&maxfeatures=30&request=GetFeature&typename=ter_territoire.maison_de_la_metropole&SRSNAME=urn:ogc:def:crs:EPSG::4326&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Maison de la Métropole de Lyon " ,
2017-08-29 14:10:50 +02:00
" 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 ,
2017-08-29 16:26:52 +02:00
" name " : u " Piscine de la Métropole de Lyon " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " identifiant " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" mairie " : {
2018-10-23 12:58:36 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&maxfeatures=30&request=GetFeature&typename=adr_voie_lieu.adrmairiepct_2_0_0&SRSNAME=urn:ogc:def:crs:EPSG::4326&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Mairie " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " identifiant " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" decheterie " : {
2018-09-16 10:12:31 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=gip_proprete.gipdecheterie_2_0_0&filter=<Filter><PropertyIsLike wildcard= ' * ' singleChar= ' . ' escape= ' ! ' ><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsLike></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Déchèterie " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " identifiant " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" donnerie " : {
2018-09-16 10:12:31 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=gip_proprete.gipdonnerie_2_0_0&filter=<Filter><PropertyIsLike wildcard= ' * ' singleChar= ' . ' escape= ' ! ' ><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsLike></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Donnerie " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " identifiant " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" bibliotheque " : {
2018-10-21 12:57:40 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=adr_voie_lieu.adrequiculturepct&SRSNAME=urn:ogc:def:crs:EPSG::4171&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Bibliothèque " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
2018-10-21 12:57:40 +02:00
" varname " : " identifiant " ,
2017-08-29 14:10:50 +02:00
" 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 ,
2017-08-29 16:26:52 +02:00
" name " : u " Aire de covoiturage " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" airquality " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}airquality/atmo/details/fr/lyon/ " ,
2018-03-27 15:50:15 +02:00
" cache_duration " : 300 ,
2017-08-29 14:10:50 +02:00
" force_async " : False ,
2018-08-15 10:28:03 +02:00
" name " : u " Qualité de l ' air " ,
" form " : [
{
" varname " : " lat " ,
" type " : " string " ,
" label " : " Latitude " ,
" required " : False ,
} ,
{
" varname " : " lon " ,
" type " : " string " ,
" label " : " Longitude " ,
" required " : False ,
}
] ,
" additional-data " : [
{
" key " : " air2go " ,
2018-09-03 13:50:41 +02:00
" url " : " { % i f q_lat or lat % }http://api.atmo-aura.fr/partenaires/indice_request?api_token=6df2b0b505cc73c5545467758827458e&longitude= { % f irstof q_lon lon % }&latitude= { % f irstof q_lat lat % } { % e ndif % } "
2018-08-15 10:28:03 +02:00
} ,
{
" key " : " nominatim " ,
" url " : " { % i f q_lat or lat % } {{ passerelle_url}}base-adresse/nominatim/reverse?lat= { % f irstof q_lat lat % }&lon= { % f irstof q_lon lon % }&format=json { % e ndif % } " ,
" cache_duration " : 3600 ,
2018-08-15 21:54:01 +02:00
} ,
{
" key " : " places " ,
" url " : " { % i f user_nameid % } {{ passerelle_url }}jsondatastore/lieux-favoris/data/?name_id= {{ user_nameid}} { % e ndif % } " ,
2018-09-13 08:28:59 +02:00
} ,
{
" key " : " place_geoloc " ,
" url " : " { % i f places % } {{ passerelle_url }}base-adresse/nominatim/search?q= {{ places.data.0.text }}&format=json { % e ndif % } " ,
" cache_duration " : 3600 ,
} ,
2018-10-02 14:55:45 +02:00
{
" key " : " place2_geoloc " ,
" url " : " { % i f places|length > 1 % } {{ passerelle_url }}base-adresse/nominatim/search?q= {{ places.data.1.text }}&format=json { % e ndif % } " ,
" cache_duration " : 3600 ,
} ,
2018-09-13 08:28:59 +02:00
] ,
" actions " : {
" geocode " : {
" url " : " {{ passerelle_url }}base-adresse/nominatim/search?q= {{ q }}&format=json " ,
" method " : " get " ,
" response " : " raw "
2018-08-15 10:28:03 +02:00
}
2018-09-13 08:28:59 +02:00
}
2017-08-29 14:10:50 +02:00
} ,
" pollen " : {
2018-03-18 09:20:55 +01:00
" url " : " https://download.data.grandlyon.com/ws/rdata/rnsa_reseau_aerobio.rnsabulletin/all.json " ,
2018-03-27 15:52:17 +02:00
" cache_duration " : 300 ,
2017-08-29 14:10:50 +02:00
" force_async " : False ,
2018-03-18 09:20:55 +01:00
" name " : u " Info Pollen " ,
" additional-data " : [
{ " key " : " syntheses " ,
" url " : " https://download.data.grandlyon.com/ws/rdata/rnsa_reseau_aerobio.rnsabulletin/all.json?field=type&value=Synthese "
}
]
2017-08-29 14:10:50 +02:00
} ,
" places " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}jsondatastore/lieux-favoris/data/?name_id= {{ user_nameid}} " ,
2017-08-29 16:26:52 +02:00
" name " : u " Lieux favoris " ,
2017-08-29 14:10:50 +02:00
" force_async " : False ,
" cache_duration " : 600 ,
2019-05-26 11:03:29 +02:00
" additional-data " : [
{
" key " : " userdata " ,
2020-03-29 21:53:00 +02:00
" url " : " {{ idp_url}}api/users/ {{ user_nameid}} "
2019-05-26 11:03:29 +02:00
}
] ,
2017-08-29 14:10:50 +02:00
" actions " : {
" create " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}jsondatastore/lieux-favoris/data/create?name_id= {{ user_nameid}} "
2017-08-29 14:10:50 +02:00
} ,
2018-09-13 13:59:47 +02:00
" update " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}jsondatastore/lieux-favoris/data/ {{ id}}/?name_id= {{ user_nameid}} "
2018-09-13 13:59:47 +02:00
} ,
2017-08-29 14:10:50 +02:00
" delete " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}jsondatastore/lieux-favoris/data/ {{ id}}/delete?name_id= {{ user_nameid}} "
2017-08-29 14:10:50 +02:00
}
}
} ,
" silo-a-verre " : {
2020-05-18 14:36:56 +02:00
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=gic_collecte.gicsiloverre&filter=<Filter><PropertyIsEqualTo><PropertyName>identifiant</PropertyName><Literal>[identifiant]</Literal></PropertyIsEqualTo></Filter> " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 86400 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Silo à verre " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " identifiant " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" tcl " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}tcl/tcl/stop/ {{ id}} " ,
2018-01-14 10:42:42 +01:00
" auto_refresh " : 25 ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 10 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " Arrêt TCL " ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " id " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" goto " : {
2019-11-07 17:56:31 +01:00
" url " : " { % i f lat1 % } {{ cityway_api_url}}api/journeyplanner/opt/PlanTrips/json?DepartureType=COORDINATES&DepartureLatitude= {{ lat1}}&DepartureLongitude= {{ lng1}}&ArrivalType=COORDINATES&ArrivalLatitude= {{ lat2}}&ArrivalLongitude= {{ lng2}}&Date= {{ date}}&DateType=DEPARTURE&TripModes= {{ tripmode}}&Algorithm=FASTEST&BikeSecurityLevel=None&BikeSpeed=12&WalkSpeed=4&MaxCarDistance=100&MaxBikeDistance=100&MaxWalkDistance=3000&AvoidDisruptions=1&StopToPlaceCar=1&SpecificOptions=GetOn;3|GetOff;4|TinyDistance;300|VLS;0|CARSHARING;0&user_key= {{ cityway_api_userkey}} { % e ndif % } " ,
2017-08-29 14:10:50 +02:00
" cache_duration " : 60 ,
" force_async " : False ,
2017-08-29 16:26:52 +02:00
" name " : u " M ' y rendre " ,
2018-09-09 17:03:03 +02:00
" loading-message " : u ' Calcul… ' ,
2017-10-20 11:18:06 +02:00
" varnames " : [ " lat1 " , " lng1 " , " lat2 " , " lng2 " , " date " , " to " ] ,
2017-08-29 14:10:50 +02:00
" form " : [
{
" varname " : " tripmode " ,
" type " : " string " ,
" label " : " Mode de transport (WALK, BIKE, PT, CAR) "
}
]
2017-09-19 14:03:55 +02:00
} ,
" cut-profile " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ idp_url}}api/users/ {{ user_nameid}}/ " ,
2017-09-24 13:01:18 +02:00
" name " : " Profil CUT " ,
2018-09-11 21:33:48 +02:00
" auto_refresh " : 60 ,
2017-09-24 13:01:18 +02:00
} ,
2017-10-20 14:58:45 +02:00
" profile-info " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ idp_url}}api/users/ {{ user_nameid}}/ " ,
2018-01-04 10:41:22 +01:00
" name " : " Infos de profil "
2017-10-20 14:58:45 +02:00
} ,
2017-09-24 13:01:18 +02:00
" suggestions " : {
" name " : " Suggestions " ,
2020-03-29 21:53:00 +02:00
" url " : " {{ idp_url}}api/users/ {{ user_nameid}} " ,
2019-05-26 11:03:29 +02:00
" force_async " : True ,
" loading-message " : " Assemblage en cours, quelques secondes… " ,
2017-09-24 13:01:18 +02:00
" additional-data " : [
{ " key " : " places " ,
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}jsondatastore/lieux-favoris/data/?name_id= {{ user_nameid}} "
2017-09-24 13:01:18 +02:00
}
]
2017-09-24 15:34:19 +02:00
} ,
" alerte-qualite-de-l-air " : {
2020-03-29 21:53:00 +02:00
" url " : " {{ passerelle_url}}feeds/alertes-qualite-de-lair/json " ,
2017-09-24 15:34:19 +02:00
" cache_duration " : 600 ,
" force_async " : True ,
" name " : u " Alerte qualité de l ' air "
2017-09-24 20:44:15 +02:00
} ,
" mairie-usager " : {
" name " : " Mairie de l ' usager " ,
2020-03-29 21:53:00 +02:00
" url " : " {{ idp_url}}api/users/ {{ user_nameid}}/ " ,
2018-07-09 22:31:17 +02:00
" form " : [
{
" varname " : " text " ,
2019-05-25 18:57:25 +02:00
" type " : " text " ,
" label " : " Texte "
}
]
} ,
" group-title " : {
" name " : " Intertitre " ,
" url " : " {{ }} " ,
" form " : [
{
" varname " : " text " ,
2018-07-09 22:31:17 +02:00
" type " : " text " ,
" label " : " Texte "
}
]
2019-05-29 09:02:06 +02:00
} ,
" stats " : {
" name " : " Statistiques tuiles " ,
" url " : " {{ portal_url}}gnm/stats/ " ,
} ,
2019-06-11 10:53:22 +02:00
" parkingtr " : {
" url " : " https:// %(data_username)s : %(data_password)s @download.data.grandlyon.com/wfs/rdata?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvoparkingtr&filter=<Filter><PropertyIsEqualTo><PropertyName>pkgid</PropertyName><Literal>[pkgid]</Literal></PropertyIsEqualTo></Filter> " % DATA_CREDENTIALS ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Parking " ,
" form " : [
{
" varname " : " pkgid " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" parc-velo " : {
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvostationnementvelo&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter> " ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Parc de stationnement vélos " ,
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" autopartage " : {
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvostationautopartage&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter> " ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Autopartage " ,
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
" stationnement-pmr " : {
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=vdl_deplacements.emplacement_pmr&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter> " ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Stationnement réglementé pour les PMR " ,
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
2020-02-26 08:31:55 +01:00
" toilette " : {
" url " : " https://download.data.grandlyon.com/wfs/grandlyon?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=adr_voie_lieu.toilettepublique_latest&outputFormat=application/json; %20s ubtype=geojson&startIndex=0&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>[gid]</Literal></PropertyIsEqualTo></Filter> " ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Toilette publique " ,
" form " : [
{
" varname " : " gid " ,
" type " : " string " ,
" label " : " gid "
}
]
} ,
2019-06-11 10:53:22 +02:00
" evenement-routier " : {
" url " : " https:// %(data_username)s : %(data_password)s @download.data.grandlyon.com/wfs/rdata?SERVICE=WFS&VERSION=2.0.0&outputformat=GEOJSON&request=GetFeature&typename=pvo_patrimoine_voirie.pvoevenement&filter=<Filter><PropertyIsEqualTo><PropertyName>id</PropertyName><Literal>[id]</Literal></PropertyIsEqualTo></Filter> " % DATA_CREDENTIALS ,
" cache_duration " : 86400 ,
" force_async " : False ,
" name " : u " Evenement routier " ,
" form " : [
{
" varname " : " id " ,
" type " : " string " ,
" label " : " Identifiant "
}
]
} ,
2019-10-04 13:47:45 +02:00
" cartads-dossiers " : {
" url " : " {{ passerelle_url}}grandlyon-cartads-cs/ {{ slug}}/files?name_id= {{ user_nameid}} " ,
2019-10-16 10:55:54 +02:00
" cache_duration " : 0 ,
2019-10-04 13:47:45 +02:00
" force_async " : True ,
" name " : u " Dossiers Cart@DS " ,
" form " : [
{
" varname " : " slug " ,
" type " : " string " ,
" label " : " Slug du connecteur "
}
2019-10-16 10:55:54 +02:00
] ,
" actions " : {
" unsubscribe " : {
" url " : " {{ passerelle_url}}grandlyon-cartads-cs/ {{ slug}}/unsubscribe?name_id= {{ user_nameid}} " ,
} ,
}
2019-10-04 13:47:45 +02:00
} ,
2017-08-29 14:10:50 +02:00
}
2018-03-12 22:32:27 +01:00
2018-06-22 13:25:09 +02:00
COMBO_ASSET_SLOTS = {
2018-07-03 16:04:49 +02:00
" banner:cut " : {
" label " : u " Logo bandeau pour Grand Lyon Connect "
} ,
2018-06-22 13:25:09 +02:00
" commune:banner " : {
2018-06-22 15:02:14 +02:00
" label " : u " Bandeau communal "
2018-06-22 13:25:09 +02:00
} ,
2019-10-28 14:51:53 +01:00
" passerelle:cartads:dossier " : {
" label " : u " Image tuile dossier urbanisme "
} ,
2018-06-22 13:25:09 +02:00
}
2018-10-02 10:23:43 +02:00
PRODUCER_LABELS = {
' atmo ' : u ' ATMO Auvergne Rhône-Alpes ' ,
' rnsa ' : u ' RNSA ' ,
' onlymoov ' : u ' ONLY MOOV ' ,
' tcl ' : u ' TCL ' ,
' toodego ' : u ' Toodego ' ,
' velov ' : u " Velo ' v " ,
2019-05-29 07:05:09 +02:00
' vivrou ' : u " Vivrou " ,
2018-10-02 10:23:43 +02:00
' grandlyon ' : u ' Grand Lyon ' ,
2019-06-11 10:53:22 +02:00
' bluely ' : u " Bluely " ,
' citiz-lpa ' : u " Citiz LPA " ,
2020-02-05 10:52:04 +01:00
' sncf ' : u " SNCF " ,
' effia ' : u " EFFIA " ,
' indigo ' : u " Indigo " ,
' lpa ' : u " LPA " ,
' sas-parc-opera ' : u " SAS Parc Opera " ,
' q-park ' : u " Q-Park " ,
' unibail ' : u " Unibail " ,
' sajr ' : u " sajr " ,
' aeroport-saint-exupe ' : u " Aéroport Saint Exupe " ,
2018-10-02 10:23:43 +02:00
}
COLLECTIVITY_LABELS = {
" albigny-sur-saone " : u " Albigny-sur-Saône " ,
" bron " : u " Bron " ,
" cailloux-sur-fontaines " : u " Cailloux-sur-Fontaines " ,
" caluire-et-cuire " : u " Caluire-et-Cuire " ,
" champagne-au-mont-d-or " : u " Champagne-au-Mont-d ' Or " ,
" charbonnieres-les-bains " : u " Charbonnières-les-Bains " ,
" charly " : u " Charly " ,
" chassieu " : u " Chassieu " ,
" collonges-au-mont-d-or " : u " Collonges-au-Mont-d ' Or " ,
" corbas " : u " Corbas " ,
" couzon-au-mont-d-or " : u " Couzon-au-Mont-d ' Or " ,
" craponne " : u " Craponne " ,
" curis-au-mont-d-or " : u " Curis-au-Mont-d ' Or " ,
" dardilly " : u " Dardilly " ,
" decines-charpieu " : u " Décines-Charpieu " ,
2019-05-09 11:25:09 +02:00
" ecully " : u " Écully " ,
2018-10-02 10:23:43 +02:00
" feyzin " : u " Feyzin " ,
" fleurieu-sur-saone " : u " Fleurieu-sur-Saône " ,
" fontaines-saint-martin " : u " Fontaines-Saint-Martin " ,
" fontaines-sur-saone " : u " Fontaines-sur-Saône " ,
" francheville " : u " Francheville " ,
" genay " : u " Genay " ,
" givors " : u " Givors " ,
" grigny " : u " Grigny " ,
" irigny " : u " Irigny " ,
" jonage " : u " Jonage " ,
" la-mulatiere " : u " La Mulatière " ,
" la-tour-de-salvagny " : u " La Tour de Salvagny " ,
" limonest " : u " Limonest " ,
" lissieu " : u " Lissieu " ,
" lyon " : u " Lyon " ,
" marcy-l-etoile " : u " Marcy-l ' Étoile " ,
" meyzieu " : u " Meyzieu " ,
" mions " : u " Mions " ,
" montanay " : u " Montanay " ,
" neuville-sur-saone " : u " Neuville-sur-Saône " ,
" oullins " : u " Oullins " ,
" pierre-benite " : u " Pierre-Bénite " ,
" poleymieux-au-mont-d-or " : u " Poleymieux-au-Mont-d ' Or " ,
" quincieux " : u " Quincieux " ,
" rillieux-la-pape " : u " Rillieux-la-Pape " ,
" rochetaillee-sur-saone " : u " Rochetaillée-sur-Saône " ,
" saint-cyr-au-mont-d-or " : u " Saint-Cyr-au-Mont-d ' Or " ,
" saint-didier-au-mont-d-or " : u " Saint-Didier-au-Mont-d ' Or " ,
" saint-fons " : u " Saint-Fons " ,
" saint-genis-laval " : u " Saint-Genis-Laval " ,
" saint-genis-les-ollieres " : u " Saint-Genis-les-Ollières " ,
" saint-germain-au-mont-d-or " : u " Saint-Germain-au-Mont-d ' Or " ,
" saint-priest " : u " Saint-Priest " ,
2019-05-09 11:25:09 +02:00
" sainte-foy-les-lyon " : u " Sainte-Foy-lès-Lyon " ,
2018-10-02 10:23:43 +02:00
" sathonay-camp " : u " Sathonay-Camp " ,
" sathonay-village " : u " Sathonay-Village " ,
" solaize " : u " Solaize " ,
" st-romain-au-mont-d-or " : u " Saint-Romain-au-Mont-d ' Or " ,
" tassin-la-demi-lune " : u " Tassin-la-Demi-Lune " ,
" vaulx-en-velin " : u " Vaulx-en-Velin " ,
" venissieux " : u " Venissieux " ,
" vernaison " : u " Vernaison " ,
" villeurbanne " : u " Villeurbanne " ,
}
PRODUCER_LABELS . update ( COLLECTIVITY_LABELS )
2018-09-04 10:41:28 +02:00
2018-10-02 10:23:43 +02:00
for producer , producer_label in PRODUCER_LABELS . items ( ) :
2018-09-04 10:41:28 +02:00
COMBO_ASSET_SLOTS [ ' logo: %s ' % producer ] = {
' label ' : u ' Logo %s ' % producer_label
}
2019-09-16 16:03:20 +02:00
# add lyon as used by cart@ds
for arrondissement in [ ' 1er ' ] + [ ' %s eme ' % x for x in range ( 2 , 10 ) ] :
COMBO_ASSET_SLOTS [ ' logo:lyon- %s ' % arrondissement ] = {
' label ' : u ' Logo Lyon %s ' % arrondissement ,
}
2018-09-04 10:41:28 +02:00
tiles = [
( ' air ' , u " Qualité de l ' air " ) ,
( ' bibliotheque ' , u " Bibliothèque " ) ,
( ' covoiturage ' , u " Aire de covoiturage " ) ,
( ' decheterie ' , u " Déchèterie " ) ,
( ' donnerie ' , u " Donnerie " ) ,
2018-09-10 15:04:17 +02:00
( ' mairie ' , u " Mairie " ) ,
2018-09-04 10:41:28 +02:00
( ' mdr ' , u " Maison du Rhône " ) ,
2019-06-11 10:53:22 +02:00
( ' parc-velo ' , u " Parc vélo " ) ,
2018-09-04 10:41:28 +02:00
( ' piscine ' , u " Piscine " ) ,
( ' pollen ' , u " Pollen " ) ,
2018-09-25 15:30:10 +02:00
( ' silo-a-verre ' , u ' Silo à verre ' ) ,
2018-09-04 10:41:28 +02:00
( ' taxi ' , u " Taxi " ) ,
( ' tcl ' , u " TCL " ) ,
( ' velov ' , u " Velo ' v " ) ,
2019-06-11 10:53:22 +02:00
( ' parkingtr ' , u " Parking " ) ,
( ' autopartage ' , u " Autopartage " ) ,
( ' evenement-routier ' , u " Événement routier " ) ,
( ' pmr ' , u " Stationnement PMR " ) ,
2020-02-27 10:29:13 +01:00
( ' toilette ' , u " Toilette publique " ) ,
2018-09-04 10:41:28 +02:00
]
for tile , tile_label in tiles :
COMBO_ASSET_SLOTS [ ' picture: %s ' % tile ] = {
' label ' : u ' Photographie %s ' % tile_label
}
if tile not in ( ' taxi ' , ' tcl ' , ' velov ' ) :
COMBO_ASSET_SLOTS [ ' picture:banner: %s ' % tile ] = {
' label ' : u ' Photographie/bannière %s ' % tile_label
}
2018-07-02 09:39:00 +02:00
WCS_FORM_ASSET_SLOTS = {
" picture " : {
2018-09-04 10:41:28 +02:00
" prefix " : u " Photographie "
} ,
" picture:banner " : {
" prefix " : u " Photographie/bannière "
2018-07-02 09:39:00 +02:00
} ,
" logo " : {
" prefix " : u " Picto "
} ,
}
2018-03-12 22:32:27 +01:00
import memcache
memcache . SERVER_MAX_VALUE_LENGTH = 10 * 1024 * 1024
2019-07-18 17:31:49 +02:00
SESSION_EXPIRE_AT_BROWSER_CLOSE = False