summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Hostbase/settings.py
diff options
context:
space:
mode:
authorDavid Dahl <dahl@mcs.anl.gov>2006-10-26 19:42:14 +0000
committerDavid Dahl <dahl@mcs.anl.gov>2006-10-26 19:42:14 +0000
commitf661e9837c1afe78ac8608796d0abee3fe4a5994 (patch)
tree17643bb967f7a698efd86b25ef46c6df436fba79 /src/lib/Server/Hostbase/settings.py
parentc0a5c5f0cec1dabee49dd9a8c5897ed1437bde31 (diff)
downloadbcfg2-f661e9837c1afe78ac8608796d0abee3fe4a5994.tar.gz
bcfg2-f661e9837c1afe78ac8608796d0abee3fe4a5994.tar.bz2
bcfg2-f661e9837c1afe78ac8608796d0abee3fe4a5994.zip
LDAP auth backend added, more environ/settings/cfg changes
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2456 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Hostbase/settings.py')
-rw-r--r--src/lib/Server/Hostbase/settings.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/Server/Hostbase/settings.py b/src/lib/Server/Hostbase/settings.py
index da8f625ca..bdde3619a 100644
--- a/src/lib/Server/Hostbase/settings.py
+++ b/src/lib/Server/Hostbase/settings.py
@@ -5,7 +5,7 @@ ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
-CFG_TYPE = 'mcs'
+CFG_TYPE = 'environ'
if CFG_TYPE == 'mcs':
# 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
@@ -23,11 +23,14 @@ if CFG_TYPE == 'mcs':
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'America/Chicago'
+ # Absolute path to the directory that holds media.
+ # Example: "/home/media/media.lawrence.com/"
+ MEDIA_ROOT = ''
if CFG_TYPE == 'environ':
import os
# 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
- DATABASE_ENGINE = os.envoiron['bcfg_db_engine']
+ DATABASE_ENGINE = os.environ['bcfg_db_engine']
# Or path to database file if using sqlite3.
DATABASE_NAME = os.environ['bcfg_db_name']
# Not used with sqlite3.
@@ -41,15 +44,21 @@ if CFG_TYPE == 'environ':
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = os.environ['bcfg_time_zone']
-
+ # Absolute path to the directory that holds media.
+ # Example: "/home/media/media.lawrence.com/"
+ MEDIA_ROOT = os.environ['bcfg_media_root']
+ #add non-default AUTH Backends:
+ AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',
+ 'Hostbase.backends.LDAPBackend',)
+ #create login url area:
+ import django.contrib.auth
+ django.contrib.auth.LOGIN_URL = '/login'
+
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''