Prevent map error when Bing layer is enabled and API key not set,
resolves #5
This commit is contained in:
parent
60d9d2e2fb
commit
f2d7d3592a
1
.env
1
.env
@ -12,6 +12,7 @@ SAHANA_MAIL_LOGIN=username:password
|
|||||||
SAHANA_MAIL_SENDER='Sahana' <sahana@example.org>
|
SAHANA_MAIL_SENDER='Sahana' <sahana@example.org>
|
||||||
SAHANA_MAIL_APPROVER=useradmin@example.org
|
SAHANA_MAIL_APPROVER=useradmin@example.org
|
||||||
|
|
||||||
|
SAHANA_API_KEY_BING=
|
||||||
SAHANA_API_KEY_GOOGLE=
|
SAHANA_API_KEY_GOOGLE=
|
||||||
SAHANA_API_KEY_OPENWEATHERMAP=
|
SAHANA_API_KEY_OPENWEATHERMAP=
|
||||||
|
|
||||||
|
@ -117,13 +117,13 @@ settings.mail.approver = os.getenv("SAHANA_MAIL_APPROVER") or "useradmin@example
|
|||||||
|
|
||||||
# Bing API Key (for Map layers)
|
# Bing API Key (for Map layers)
|
||||||
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
||||||
#settings.gis.api_bing = ""
|
settings.gis.api_bing = os.getenv("SAHANA_API_KEY_BING") or "missing_api_key"
|
||||||
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
||||||
#settings.gis.api_getaddress = ""
|
#settings.gis.api_getaddress = ""
|
||||||
# Google API Key (for Google Maps Layers)
|
# Google API Key (for Google Maps Layers)
|
||||||
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or ""
|
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or "missing_api_key"
|
||||||
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
||||||
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or ""
|
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or "missing_api_key"
|
||||||
|
|
||||||
# GeoNames username
|
# GeoNames username
|
||||||
#settings.gis.geonames_username = ""
|
#settings.gis.geonames_username = ""
|
||||||
|
@ -117,13 +117,13 @@ settings.mail.approver = os.getenv("SAHANA_MAIL_APPROVER") or "useradmin@example
|
|||||||
|
|
||||||
# Bing API Key (for Map layers)
|
# Bing API Key (for Map layers)
|
||||||
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
||||||
#settings.gis.api_bing = ""
|
settings.gis.api_bing = os.getenv("SAHANA_API_KEY_BING") or "missing_api_key"
|
||||||
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
||||||
#settings.gis.api_getaddress = ""
|
#settings.gis.api_getaddress = ""
|
||||||
# Google API Key (for Google Maps Layers)
|
# Google API Key (for Google Maps Layers)
|
||||||
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or ""
|
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or "missing_api_key"
|
||||||
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
||||||
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or ""
|
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or "missing_api_key"
|
||||||
|
|
||||||
# GeoNames username
|
# GeoNames username
|
||||||
#settings.gis.geonames_username = ""
|
#settings.gis.geonames_username = ""
|
||||||
|
@ -7,6 +7,7 @@ Defaults env_keep += "SAHANA_MAIL_HOST"
|
|||||||
Defaults env_keep += "SAHANA_MAIL_LOGIN"
|
Defaults env_keep += "SAHANA_MAIL_LOGIN"
|
||||||
Defaults env_keep += "SAHANA_MAIL_SENDER"
|
Defaults env_keep += "SAHANA_MAIL_SENDER"
|
||||||
Defaults env_keep += "SAHANA_MAIL_APPROVER"
|
Defaults env_keep += "SAHANA_MAIL_APPROVER"
|
||||||
|
Defaults env_keep += "SAHANA_API_KEY_BING"
|
||||||
Defaults env_keep += "SAHANA_API_KEY_GOOGLE"
|
Defaults env_keep += "SAHANA_API_KEY_GOOGLE"
|
||||||
Defaults env_keep += "SAHANA_API_KEY_OPENWEATHERMAP"
|
Defaults env_keep += "SAHANA_API_KEY_OPENWEATHERMAP"
|
||||||
Defaults env_keep += "SAHANA_PUBLIC_URL"
|
Defaults env_keep += "SAHANA_PUBLIC_URL"
|
||||||
|
@ -117,13 +117,13 @@ settings.mail.approver = os.getenv("SAHANA_MAIL_APPROVER") or "useradmin@example
|
|||||||
|
|
||||||
# Bing API Key (for Map layers)
|
# Bing API Key (for Map layers)
|
||||||
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
# http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
||||||
#settings.gis.api_bing = ""
|
settings.gis.api_bing = os.getenv("SAHANA_API_KEY_BING") or "missing_api_key"
|
||||||
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
# GetAddress API Key (for GetAddress.io Postcode to Address lookup)
|
||||||
#settings.gis.api_getaddress = ""
|
#settings.gis.api_getaddress = ""
|
||||||
# Google API Key (for Google Maps Layers)
|
# Google API Key (for Google Maps Layers)
|
||||||
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or ""
|
settings.gis.api_google = os.getenv("SAHANA_API_KEY_GOOGLE") or "missing_api_key"
|
||||||
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
# OpenWeatherMap API Key (for OpenWeatherMap Layers)
|
||||||
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or ""
|
settings.gis.api_openweathermap = os.getenv("SAHANA_API_KEY_OPENWEATHERMAP") or "missing_api_key"
|
||||||
|
|
||||||
# GeoNames username
|
# GeoNames username
|
||||||
#settings.gis.geonames_username = ""
|
#settings.gis.geonames_username = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user