660 lines
29 KiB
Python
660 lines
29 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
if not 'combo_plugin_gnm' in INSTALLED_APPS:
|
|
INSTALLED_APPS += ('combo_plugin_gnm',)
|
|
TENANT_APPS += ('combo_plugin_gnm',)
|
|
|
|
MELLON_ADD_AUTHNREQUEST_NEXT_URL_EXTENSION = True
|
|
|
|
COMBO_MAP_TILE_URLTEMPLATE = "https://tiles.entrouvert.org/hdm/{z}/{x}/{y}.png"
|
|
COMBO_MAP_ATTRIBUTION = "© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>"
|
|
COMBO_GEOCODING_SERVICE = 'https://nominatim.entrouvert.org'
|
|
|
|
JSON_CELL_TYPES = {
|
|
"velov": {
|
|
"url": "https://%(data_username)s:%(data_password)s@download.data.grandlyon.com/ws/rdata/jcd_jcdecaux.jcdvelov/all.json?field=gid&value=[gid]"
|
|
% DATA_CREDENTIALS,
|
|
"name": u"Velov",
|
|
"cache_duration": 60,
|
|
"force_async": False,
|
|
"auto_refresh": 90,
|
|
"form": [{"varname": "gid", "type": "string", "label": "GID de la station"}],
|
|
},
|
|
"taxi": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/taxi/?property:gid={{gid}}",
|
|
"name": u"Station de taxi",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"form": [{"varname": "gid", "type": "string", "label": "GID de la station"}],
|
|
},
|
|
"mdr": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/mdr/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Maison de la Métropole de Lyon",
|
|
"toodego:page": True,
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"piscine": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/piscine/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Piscine de la Métropole de Lyon",
|
|
"toodego:page": True,
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"mairie": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/mairie/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Mairie",
|
|
"toodego:page": True,
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"decheterie": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/decheterie/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Déchèterie",
|
|
"toodego:page": True,
|
|
"toodego:page-title-template": "Déchèterie {{properties.nom}}",
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"donnerie": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/donnerie/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Donnerie",
|
|
"toodego:page": True,
|
|
"toodego:page-title-template": "Donnerie {{properties.nom}}",
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"bibliotheque": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/bibliotheque/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Bibliothèque",
|
|
"toodego:page": True,
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"aire-de-covoiturage": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/aire-de-covoiturage/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Aire de covoiturage",
|
|
"form": [{"varname": "gid", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"airquality": {
|
|
"url": "{% if q_lat or lat %}http://api.atmo-aura.fr/partenaires/indice_request?api_token=6df2b0b505cc73c5545467758827458e&longitude={% firstof q_lon lon %}&latitude={% firstof q_lat lat %}{% endif %}",
|
|
"cache_duration": 300,
|
|
"force_async": False,
|
|
"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",
|
|
"url": "{% if q_lat or lat %}http://api.atmo-aura.fr/partenaires/indice_request?api_token=6df2b0b505cc73c5545467758827458e&longitude={% firstof q_lon lon %}&latitude={% firstof q_lat lat %}{% endif %}",
|
|
},
|
|
{
|
|
"key": "nominatim",
|
|
"url": "{% if q_lat or lat %}{{passerelle_url}}base-adresse/nominatim/reverse?lat={% firstof q_lat lat %}&lon={% firstof q_lon lon %}&format=json{% endif %}",
|
|
"cache_duration": 3600,
|
|
},
|
|
{
|
|
"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,
|
|
},
|
|
{
|
|
"key": "place2_geoloc",
|
|
"url": "{% if places|length > 1 %}{{ passerelle_url }}base-adresse/nominatim/search?q={{ places.data.1.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",
|
|
"cache_duration": 300,
|
|
"force_async": False,
|
|
"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",
|
|
}
|
|
],
|
|
},
|
|
"places": {
|
|
"url": "{{passerelle_url}}jsondatastore/lieux-favoris/data/?name_id={{user_nameid}}",
|
|
"name": u"Lieux favoris",
|
|
"force_async": False,
|
|
"cache_duration": 600,
|
|
"additional-data": [{"key": "userdata", "url": "{{idp_url}}api/users/{{user_nameid}}"}],
|
|
"actions": {
|
|
"create": {
|
|
"url": "{{passerelle_url}}jsondatastore/lieux-favoris/data/create?name_id={{user_nameid}}"
|
|
},
|
|
"update": {
|
|
"url": "{{passerelle_url}}jsondatastore/lieux-favoris/data/{{id}}/?name_id={{user_nameid}}"
|
|
},
|
|
"delete": {
|
|
"url": "{{passerelle_url}}jsondatastore/lieux-favoris/data/{{id}}/delete?name_id={{user_nameid}}"
|
|
},
|
|
},
|
|
},
|
|
"silo-a-verre": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/silo-a-verre/?property:identifiant={{identifiant}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Silo à verre",
|
|
"form": [{"varname": "identifiant", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"tcl": {
|
|
"url": "{{passerelle_url}}tcl/tcl/stop/{{id}}",
|
|
"auto_refresh": 25,
|
|
"cache_duration": 10,
|
|
"force_async": False,
|
|
"name": u"Arrêt TCL",
|
|
"form": [{"varname": "id", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"goto": {
|
|
"url": "{% load l10n %}{% localize off %}{% if 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&UserId={% firstof cityway_api_userid 'toodego' %}&user_key={{cityway_api_userkey}}{% endif %}{% endlocalize %}",
|
|
"cache_duration": 60,
|
|
"force_async": False,
|
|
"name": u"M'y rendre",
|
|
"loading-message": u'Calcul…',
|
|
"varnames": ["lat1", "lng1", "lat2", "lng2", "date", "to"],
|
|
"form": [
|
|
{"varname": "tripmode", "type": "string", "label": "Mode de transport (WALK, BIKE, PT, CAR)"}
|
|
],
|
|
},
|
|
"cut-profile": {
|
|
"url": "{{idp_url}}api/users/{{user_nameid}}/",
|
|
"name": "Profil CUT",
|
|
"auto_refresh": 60,
|
|
},
|
|
"profile-info": {"url": "{{idp_url}}api/users/{{user_nameid}}/", "name": "Infos de profil"},
|
|
"suggestions": {
|
|
"name": "Suggestions",
|
|
"url": "{{idp_url}}api/users/{{user_nameid}}",
|
|
"force_async": True,
|
|
"loading-message": "Assemblage en cours, quelques secondes…",
|
|
"additional-data": [
|
|
{
|
|
"key": "places",
|
|
"url": "{{passerelle_url}}jsondatastore/lieux-favoris/data/?name_id={{user_nameid}}",
|
|
}
|
|
],
|
|
},
|
|
"alerte-qualite-de-l-air": {
|
|
"url": "{{passerelle_url}}feeds/alertes-qualite-de-lair/json",
|
|
"cache_duration": 600,
|
|
"force_async": True,
|
|
"name": u"Alerte qualité de l'air",
|
|
},
|
|
"mairie-usager": {
|
|
"name": "Mairie de l'usager",
|
|
"url": "{{idp_url}}api/users/{{user_nameid}}/",
|
|
"form": [{"varname": "text", "type": "text", "label": "Texte"}],
|
|
},
|
|
"group-title": {
|
|
"name": "Intertitre",
|
|
"url": "{{}}",
|
|
"form": [{"varname": "text", "type": "text", "label": "Texte"}],
|
|
},
|
|
"stats": {
|
|
"name": "Statistiques tuiles",
|
|
"url": "{{portal_url}}gnm/stats/",
|
|
},
|
|
"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": "{{passerelle_url}}opengis/data-grandlyon-general/query/parc-velo/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Parc de stationnement vélos",
|
|
"form": [{"varname": "gid", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"autopartage": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/autopartage/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Autopartage",
|
|
"form": [{"varname": "gid", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"stationnement-pmr": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/stationnement-pmr/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Stationnement réglementé pour les PMR",
|
|
"form": [{"varname": "gid", "type": "string", "label": "Identifiant"}],
|
|
},
|
|
"toilette": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-general/query/toilette/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": u"Toilette publique",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"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"}],
|
|
},
|
|
"cartads-dossiers": {
|
|
"url": "{{passerelle_url}}grandlyon-cartads-cs/{{slug}}/files?name_id={{user_nameid}}",
|
|
"cache_duration": 0,
|
|
"force_async": True,
|
|
"name": u"Dossiers Cart@DS",
|
|
"form": [{"varname": "slug", "type": "string", "label": "Slug du connecteur"}],
|
|
"actions": {
|
|
"unsubscribe": {
|
|
"url": "{{passerelle_url}}grandlyon-cartads-cs/{{slug}}/unsubscribe?name_id={{user_nameid}}",
|
|
},
|
|
},
|
|
},
|
|
"urgence-sanitaire-soins": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/urgence-sanitaire-soins/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Urgence sanitaire Covid 19 - Accès aux soins",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/urgence-sanitaire.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"urgence-sanitaire-alimentation": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/urgence-sanitaire-alimentation/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Urgence sanitaire Covid 19 - Alimentation",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/urgence-sanitaire.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"urgence-sanitaire-hebergement": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/urgence-sanitaire-hebergement/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Urgence sanitaire Covid 19 - Hébergement",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/urgence-sanitaire.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"urgence-sanitaire-quotidien": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/urgence-sanitaire-quotidien/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Urgence sanitaire Covid 19 - Services au quotidien",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/urgence-sanitaire.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-animaux-jardin-bricolage": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-animaux-jardin-bricolage/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Animaux jardin bricolage",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-autres-activites": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-autres-activites/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Autres activités",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-deco-meubles": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-deco-meubles/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Déco meubles",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-fleuriste": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-fleuriste/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Fleuriste",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-jeux-jouets": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-jeux-jouets/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Jeux jouets",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-librairie": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-librairie/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Librairie",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-mode": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-mode/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Mode",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-restauration": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-restauration/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Restauration",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-soins-institut-beaute": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-soins-institut-beaute/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Soins institut beauté",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"commerce-sport-loisirs": {
|
|
"url": "{{passerelle_url}}opengis/data-grandlyon-rdata/query/commerce-sport-loisirs/?property:gid={{gid}}",
|
|
"cache_duration": 86400,
|
|
"force_async": False,
|
|
"name": "Commerce - Sport loisirs",
|
|
"toodego:page": True,
|
|
"template-name": "combo/json/commerce.html",
|
|
"form": [{"varname": "gid", "type": "string", "label": "gid"}],
|
|
},
|
|
"rsj-a-traiter": {
|
|
"url": "{{eservices_url}}api/forms/?limit={% firstof limit 100 %}{% if category_id %}&category_id={{ category_id }}{% endif %}&NameID={{user_nameid}}",
|
|
"cache_duration": 120,
|
|
"name": "Demandes à traiter (RSJ)",
|
|
"form": [
|
|
{"varname": "limit", "type": "string", "label": "Nombre max de demandes"},
|
|
{"varname": "category_id", "type": "string", "label": "Identifiant de la catégorie"},
|
|
],
|
|
},
|
|
"rsj-fiche": {
|
|
"url": "{{eservices_url}}api/cards/jeunes-rsa/{{jeunes_rsa_id}}/",
|
|
"name": "Fiche RSJ",
|
|
"cache_duration": 120,
|
|
},
|
|
"caluire-famille": {
|
|
"cache_duration": 30,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Infos famille",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/family_info?NameID={{ user_nameid }}",
|
|
"form": [{"label": "Identifiant du connecteur", "varname": "slug", "required": True}],
|
|
},
|
|
"caluire-responsables": {
|
|
"cache_duration": 30,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Infos responsables",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/family_info?NameID={{ user_nameid }}",
|
|
"form": [{"label": "Identifiant du connecteur", "varname": "slug", "required": True}],
|
|
},
|
|
"caluire-liste-enfants": {
|
|
"cache_duration": 30,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Liste des enfants (repeat)",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/children_info?NameID={{ user_nameid }}",
|
|
"make_global": "list_children",
|
|
"form": [{"label": "Identifiant du connecteur", "varname": "slug", "required": True}],
|
|
},
|
|
"caluire-enfant": {
|
|
"cache_duration": 0,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Enfant (repeat)",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/child_info?NameID={{ user_nameid }}&idpersonne={{ list_children.data|get:repeat_index|get:'id' }}",
|
|
"repeat": "{{ list_children.data|length }}",
|
|
"additional-data": [
|
|
{
|
|
"key": "schooling",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/child_schooling_info?"
|
|
"NameID={{ user_nameid }}&idpersonne={{ list_children.data|get:repeat_index|get:'id' }}&schooling_date={% now 'Y-m-d' %}",
|
|
},
|
|
{
|
|
"key": "activities",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/child_activities_info?"
|
|
"NameID={{ user_nameid }}&idpersonne={{ list_children.data|get:repeat_index|get:'id' }}&schooling_date={% now 'Y-m-d' %}",
|
|
},
|
|
],
|
|
"form": [
|
|
{"label": "Identifiant du connecteur", "varname": "slug", "required": True},
|
|
],
|
|
},
|
|
"caluire-enfant-detail": {
|
|
"cache_duration": 30,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Enfant",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/child_info?NameID={{ user_nameid }}&idpersonne={{ child_id }}",
|
|
"form": [
|
|
{"label": "Identifiant du connecteur", "varname": "slug", "required": True},
|
|
],
|
|
},
|
|
"caluire-enfant-prochaines-inscriptions": {
|
|
"cache_duration": 0,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Prochaines inscriptions",
|
|
"url": "{% now 'n' as current_month %}{% if current_month in '678' %}"
|
|
"{{ passerelle_url }}caluire-axel/{{ slug }}/child_activities_info?NameID={{ user_nameid }}&idpersonne={{ child_id }}"
|
|
"&schooling_date={% now 'Y' as current_year %}{{ current_year|add:'1' }}-{% now 'm-d' %}{% endif %}",
|
|
"form": [
|
|
{"label": "Identifiant du connecteur", "varname": "slug", "required": True},
|
|
],
|
|
},
|
|
"caluire-enfant-agenda": {
|
|
"cache_duration": 0,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Agenda",
|
|
"url": "{{ passerelle_url }}caluire-axel/{{ slug }}/get_agenda_full?NameID={{ user_nameid }}&idpersonne={{ child_id }}"
|
|
"{% now 'Y' as current_year %}{% now 'n' as current_month %}"
|
|
"&start_date={% if current_month in '87654321' %}{{ current_year|add:'-1' }}{% else %}{{ current_year }}{% endif %}-09-01"
|
|
"&end_date={% if current_month in '87654321' %}{{ current_year }}{% else %}{{ current_year|add:'1' }}{% endif %}-08-31",
|
|
"form": [
|
|
{"label": "Identifiant du connecteur", "varname": "slug", "required": True},
|
|
],
|
|
},
|
|
"caluire-enfant-agenda-next-year": {
|
|
"cache_duration": 0,
|
|
"force_async": True,
|
|
"name": "Caluire-et-Cuire - Teamnet Axel: Agenda prochaine année scolaire",
|
|
"url": "{% now 'Y' as current_year %}{% now 'n' as current_month %}{% if current_month in '678' %}"
|
|
"{{ passerelle_url }}caluire-axel/{{ slug }}/get_agenda_full?NameID={{ user_nameid }}&idpersonne={{ child_id }}"
|
|
"&start_date={% if current_month in '87654321' %}{{ current_year }}{% else %}{{ current_year|add:'1' }}{% endif %}-09-01"
|
|
"&end_date={% if current_month in '87654321' %}{{ current_year|add:'1' }}{% else %}{{ current_year|add:'2' }}{% endif %}-08-31{% endif %}",
|
|
"form": [
|
|
{"label": "Identifiant du connecteur", "varname": "slug", "required": True},
|
|
],
|
|
},
|
|
}
|
|
|
|
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",
|
|
'vivrou': u"Vivrou",
|
|
'grandlyon': u'Grand Lyon',
|
|
'bluely': u"Bluely",
|
|
'citiz-lpa': u"Citiz LPA",
|
|
'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",
|
|
}
|
|
|
|
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",
|
|
"ecully": u"Écully",
|
|
"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",
|
|
"sainte-foy-les-lyon": u"Sainte-Foy-lès-Lyon",
|
|
"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)
|
|
|
|
for producer, producer_label in PRODUCER_LABELS.items():
|
|
COMBO_ASSET_SLOTS['logo:%s' % producer] = {'label': u'Logo %s' % producer_label}
|
|
|
|
# add lyon as used by cart@ds
|
|
for arrondissement in ['1er'] + ['%seme' % x for x in range(2, 10)]:
|
|
COMBO_ASSET_SLOTS['logo:lyon-%s' % arrondissement] = {
|
|
'label': u'Logo Lyon %s' % arrondissement,
|
|
}
|
|
|
|
tiles = [
|
|
('air', u"Qualité de l'air"),
|
|
('bibliotheque', u"Bibliothèque"),
|
|
('commerce-animaux-jardin-bricolage', 'Commerce - Animaux jardin bricolage'),
|
|
('commerce-autres-activites', 'Commerce - Autres activités'),
|
|
('commerce-deco-meubles', 'Commerce - Déco meubles'),
|
|
('commerce-fleuriste', 'Commerce - Fleuriste'),
|
|
('commerce-jeux-jouets', 'Commerce - Jeux jouets'),
|
|
('commerce-librairie', 'Commerce - Librairie'),
|
|
('commerce-mode', 'Commerce - Mode'),
|
|
('commerce-restauration', 'Commerce - Restauration'),
|
|
('commerce-soins-institut-beaute', 'Commerce - Soins institut beauté'),
|
|
('commerce-sport-loisirs', 'Commerce - Sport loisirs'),
|
|
('covoiturage', u"Aire de covoiturage"),
|
|
('decheterie', u"Déchèterie"),
|
|
('donnerie', u"Donnerie"),
|
|
('mairie', u"Mairie"),
|
|
('mdr', u"Maison du Rhône"),
|
|
('parc-velo', u"Parc vélo"),
|
|
('piscine', u"Piscine"),
|
|
('pollen', u"Pollen"),
|
|
('silo-a-verre', u'Silo à verre'),
|
|
('taxi', u"Taxi"),
|
|
('tcl', u"TCL"),
|
|
('velov', u"Velo'v"),
|
|
('parkingtr', u"Parking"),
|
|
('autopartage', u"Autopartage"),
|
|
('evenement-routier', u"Événement routier"),
|
|
('pmr', u"Stationnement PMR"),
|
|
('toilette', u"Toilette publique"),
|
|
('urgence-sanitaire-soins', 'Urgence sanitaire Covid 19 - Accès aux soins'),
|
|
('urgence-sanitaire-alimentation', 'Urgence sanitaire Covid 19 - Alimentation'),
|
|
('urgence-sanitaire-hebergement', 'Urgence sanitaire Covid 19 - Hébergement'),
|
|
('urgence-sanitaire-quotidien', 'Urgence sanitaire Covid 19 - Services au quotidien'),
|
|
]
|
|
|
|
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}
|
|
|
|
import memcache
|
|
|
|
memcache.SERVER_MAX_VALUE_LENGTH = 10 * 1024 * 1024
|
|
|
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
|