X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=settings.py;h=832a3f40af65ea6e4e2350b1f84b494264b1dcd5;hp=d8f7bb40f97a6171fe2da133da789cfd4430c34d;hb=HEAD;hpb=8a9319586dc6fb44b83ba161bcc5a651da536cf1 diff --git a/settings.py b/settings.py index d8f7bb4..832a3f4 100644 --- a/settings.py +++ b/settings.py @@ -9,16 +9,29 @@ ADMINS = ( MANAGERS = ADMINS -DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = 'ldapdb.db' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'ldapdb.db', + 'USER': '', + 'PASSWORD': '', + 'HOST': '', + 'PORT': '', + }, + 'ldap': { + 'ENGINE': 'ldapdb.backends.ldap', + 'NAME': 'ldap://', + 'USER': 'cn=admin,dc=nodomain', + 'PASSWORD': 'test', + } +} +DATABASE_ROUTERS = ['ldapdb.router.Router'] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. +# On Unix systems, a value of None will cause Django to use the same +# timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Chicago' @@ -33,7 +46,11 @@ SITE_ID = 1 # to load the internationalization machinery. USE_I18N = True -# Absolute path to the directory that holds media. +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale +USE_L10N = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = '' @@ -52,15 +69,17 @@ SECRET_KEY = 'some_random_secret_key' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'urls' @@ -81,6 +100,3 @@ INSTALLED_APPS = ( 'django.contrib.admin', ) -LDAPDB_BIND_DN="cn=admin,dc=nodomain" -LDAPDB_BIND_PASSWORD="test" -LDAPDB_SERVER_URI="ldap://"