summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Reports
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Reports')
-rw-r--r--src/lib/Server/Reports/settings.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Server/Reports/settings.py b/src/lib/Server/Reports/settings.py
index 93c77b387..712d597f6 100644
--- a/src/lib/Server/Reports/settings.py
+++ b/src/lib/Server/Reports/settings.py
@@ -95,7 +95,10 @@ AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',
# The NIS group authorized to login to BCFG2's reportinvg system
AUTHORIZED_GROUP = ''
#create login url area:
-import django.contrib.auth
+try:
+ import django.contrib.auth
+except ImportError:
+ print('Import of Django module failed. Is Django installed?')
django.contrib.auth.LOGIN_URL = '/login'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True