Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

121 lines (93 sloc) 2.788 kb
# -*- coding: utf-8 -*-
# Django settings for the mozillians project.
import ldap
from django_auth_ldap.config import _LDAPConfig, LDAPSearch
from funfactory.settings_base import *
## Log settings
SYSLOG_TAG = "http_app_mozillians"
LOGGING = {
'loggers': {
'landing': {'level': logging.INFO},
'phonebook': {'level': logging.INFO},
},
}
LOCALE_PATHS = [path('locale')]
# Accepted locales
PROD_LANGUAGES = ('en-US', 'de', 'fr')
# List of RTL locales known to this project. Subset of LANGUAGES.
RTL_LANGUAGES = () # ('ar', 'fa', 'fa-IR', 'he')
# For absoluate urls
PROTOCOL = "https://"
PORT = 443
## Media and templates.
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'jingo.Loader',
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MINIFY_BUNDLES = {
'css': {
'common': (
'css/mozilla-base.css',
'css/main.css',
),
},
'js': {
'common': (
'js/libs/jquery-1.4.4.min.js',
'js/webtrends.js',
'js/main.js',
),
}
}
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
'larper.middleware.LarperMiddleware',
]
# OpenLDAP
LDAP_USERS_GROUP = 'ou=people,dc=mozillians,dc=org'
# django-auth-ldap
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
)
AUTH_LDAP_USER_SEARCH = LDAPSearch(LDAP_USERS_GROUP, ldap.SCOPE_SUBTREE,
"(uid=%(user)s)")
AUTH_LDAP_USER_ATTR_MAP = {"first_name": "cn", "last_name": "sn",
"email": "mail"}
AUTH_LDAP_PROFILE_ATTR_MAP = {"home_directory": "homeDirectory",
"unique_id": "uniqueIdentifier",
"phone": "telephoneNumber:",
"voucher": "mozilliansVouchedBy"}
AUTH_LDAP_ALWAYS_UPDATE_USER = False
INSTALLED_APPS = list(INSTALLED_APPS) + [
'landing',
'phonebook',
'users',
'larper',
# Local apps
'jingo_minify',
'tower', # for ./manage.py extract (L10n)
'django.contrib.admin',
'django.contrib.auth',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
]
## Auth
PWD_ALGORITHM = 'bcrypt'
HMAC_KEYS = {
'2011-01-01': 'cheesecake',
}
SESSION_COOKIE_HTTPONLY = True
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
# Email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Auth
LOGIN_URL = '/login'
LOGIN_REDIRECT_URL = '/'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}
Jump to Line
Something went wrong with that request. Please try again.