From 1338bf601229497c3070184483c6d408b56775f1 Mon Sep 17 00:00:00 2001 From: Gelob Date: Tue, 28 Jun 2016 11:12:36 -0400 Subject: [PATCH] Banner/MOTD Support --- netbox/netbox/configuration.example.py | 2 ++ netbox/netbox/settings.py | 2 ++ netbox/templates/_base.html | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/netbox/netbox/configuration.example.py b/netbox/netbox/configuration.example.py index 96e605859..60eceaf28 100644 --- a/netbox/netbox/configuration.example.py +++ b/netbox/netbox/configuration.example.py @@ -73,3 +73,5 @@ TIME_FORMAT = 'g:i a' SHORT_TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'N j, Y g:i a' SHORT_DATETIME_FORMAT = 'Y-m-d H:i' +BANNER_TOP = '' +BANNER_BOTTOM = '' diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 860c28288..0feb2c8b5 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -38,6 +38,8 @@ SHORT_TIME_FORMAT = getattr(configuration, 'SHORT_TIME_FORMAT', 'H:i:s') DATETIME_FORMAT = getattr(configuration, 'DATETIME_FORMAT', 'N j, Y g:i a') SHORT_DATETIME_FORMAT = getattr(configuration, 'SHORT_DATETIME_FORMAT', 'Y-m-d H:i') CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS +BANNER_TOP = getattr(configuration, 'BANNER_TOP', False) +BANNER_BOTTOM = getattr(configuration, 'BANNER_BOTTOM', False) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/netbox/templates/_base.html b/netbox/templates/_base.html index bb6d8bd8f..66614888e 100644 --- a/netbox/templates/_base.html +++ b/netbox/templates/_base.html @@ -224,6 +224,11 @@
+ {% if settings.BANNER_TOP %} + + {% endif %} {% if settings.MAINTENANCE_MODE %}