From bf910dea022709f7616f4a4952bd100afe0447b3 Mon Sep 17 00:00:00 2001 From: Thomas McWork Date: Tue, 19 Apr 2022 12:21:07 +0200 Subject: [PATCH 1/2] Handle `MAPS_URL` config value Regarding https://github.com/netbox-community/netbox/blob/develop/docs/configuration/dynamic-settings.md#maps_url --- configuration/configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configuration/configuration.py b/configuration/configuration.py index 78954f9..b3568e3 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -251,3 +251,6 @@ TIME_FORMAT = environ.get('TIME_FORMAT', 'g:i a') SHORT_TIME_FORMAT = environ.get('SHORT_TIME_FORMAT', 'H:i:s') DATETIME_FORMAT = environ.get('DATETIME_FORMAT', 'N j, Y g:i a') SHORT_DATETIME_FORMAT = environ.get('SHORT_DATETIME_FORMAT', 'Y-m-d H:i') + +# Maps provider +MAPS_URL = environ.get('MAPS_URL', None) From 596bb6953c9119475137a3a22e848fb27eb6b74e Mon Sep 17 00:00:00 2001 From: Thomas McWork Date: Tue, 19 Apr 2022 12:59:27 +0200 Subject: [PATCH 2/2] preserve sort order --- configuration/configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration/configuration.py b/configuration/configuration.py index b3568e3..c8ddd14 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -170,6 +170,9 @@ LOGIN_TIMEOUT = int(environ.get('LOGIN_TIMEOUT', 1209600)) # Setting this to True will display a "maintenance mode" banner at the top of every page. MAINTENANCE_MODE = environ.get('MAINTENANCE_MODE', 'False').lower() == 'true' +# Maps provider +MAPS_URL = environ.get('MAPS_URL', None) + # An API consumer can request an arbitrary number of objects =by appending the "limit" parameter to the URL (e.g. # "?limit=1000"). This setting defines the maximum limit. Setting it to 0 or None will allow an API consumer to request # all objects by specifying "?limit=0". @@ -251,6 +254,3 @@ TIME_FORMAT = environ.get('TIME_FORMAT', 'g:i a') SHORT_TIME_FORMAT = environ.get('SHORT_TIME_FORMAT', 'H:i:s') DATETIME_FORMAT = environ.get('DATETIME_FORMAT', 'N j, Y g:i a') SHORT_DATETIME_FORMAT = environ.get('SHORT_DATETIME_FORMAT', 'Y-m-d H:i') - -# Maps provider -MAPS_URL = environ.get('MAPS_URL', None)