1# -*- coding: utf-8 -*- 2# This software is distributed under the two-clause BSD license. 3# Copyright (c) The django-ldapdb project 4 5from __future__ import unicode_literals 6 7import ldap 8 9DEBUG = True 10 11DATABASES = { 12 'default': { 13 'ENGINE': 'django.db.backends.sqlite3', 14 'NAME': 'ldapdb.db', 15 'USER': '', 16 'PASSWORD': '', 17 'HOST': '', 18 'PORT': '', 19 }, 20 'ldap': { 21 'ENGINE': 'ldapdb.backends.ldap', 22 'NAME': 'ldap://localhost', 23 'USER': 'cn=admin,dc=nodomain', 24 'PASSWORD': 'test', 25 # 'TLS': True, 26 'CONNECTION_OPTIONS': { 27 ldap.OPT_X_TLS_DEMAND: True, 28 } 29 } 30} 31DATABASE_ROUTERS = ['ldapdb.router.Router'] 32 33# Local time zone for this installation. Choices can be found here: 34# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 35# although not all choices may be available on all operating systems. 36# On Unix systems, a value of None will cause Django to use the same 37# timezone as the operating system. 38# If running in a Windows environment this must be set to the same as your 39# system time zone. 40TIME_ZONE = 'America/Chicago' 41 42# Language code for this installation. All choices can be found here: 43# http://www.i18nguy.com/unicode/language-identifiers.html 44LANGUAGE_CODE = 'en-us' 45 46# If you set this to False, Django will make some optimizations so as not 47# to load the internationalization machinery. 48USE_I18N = True 49 50# If you set this to False, Django will not format dates, numbers and 51# calendars according to the current locale 52USE_L10N = True 53 54USE_TZ = True 55 56# Absolute filesystem path to the directory that will hold user-uploaded files. 57# Example: "/home/media/media.lawrence.com/" 58MEDIA_ROOT = '' 59 60# URL that handles the media served from MEDIA_ROOT. Make sure to use a 61# trailing slash if there is a path component (optional in other cases). 62# Examples: "http://media.lawrence.com", "http://example.com/media/" 63MEDIA_URL = '' 64 65# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 66# trailing slash. 67# Examples: "http://foo.com/media/", "/media/". 68ADMIN_MEDIA_PREFIX = '/media/' 69 70# Make this unique, and don't share it with anybody. 71SECRET_KEY = 'some_random_secret_key' 72 73MIDDLEWARE = [ 74 'django.middleware.common.CommonMiddleware', 75 'django.contrib.sessions.middleware.SessionMiddleware', 76 'django.middleware.csrf.CsrfViewMiddleware', 77 'django.contrib.auth.middleware.AuthenticationMiddleware', 78 'django.contrib.messages.middleware.MessageMiddleware', 79] 80 81ROOT_URLCONF = 'examples.urls' 82 83STATIC_URL = '/static/' 84 85TEMPLATES = [ 86 { 87 'BACKEND': 'django.template.backends.django.DjangoTemplates', 88 'DIRS': [], 89 'APP_DIRS': True, 90 'OPTIONS': { 91 'context_processors': [ 92 'django.contrib.auth.context_processors.auth', 93 'django.template.context_processors.debug', 94 'django.template.context_processors.i18n', 95 'django.template.context_processors.media', 96 'django.template.context_processors.static', 97 'django.template.context_processors.tz', 98 'django.contrib.messages.context_processors.messages', 99 ], 100 }, 101 }, 102] 103 104INSTALLED_APPS = ( 105 'django.contrib.auth', 106 'django.contrib.contenttypes', 107 'django.contrib.sessions', 108 'django.contrib.messages', 109 'ldapdb', 110 'examples', 111 'django.contrib.admin', 112) 113