""" Django settings for ponyconf project. """ from django.utils.translation import gettext_lazy as _ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'm2d03t^m)!nsborq5a1#e!#m)wjl&-%tu4ew@fxf1_b_t*@36r' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ # the post_migrate creating the first site should be called at first 'django.contrib.sites', # our apps 'ponyconf', 'accounts', 'cfp', 'mailing', # third-party apps 'bootstrap3', 'django_select2', 'crispy_forms', 'crispy_bootstrap3', # build-in apps 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'cfp.middleware.ConferenceMiddleware', ] ROOT_URLCONF = 'ponyconf.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', #'ponyconf.context_processors.site', 'cfp.context_processors.conference', ], }, }, ] WSGI_APPLICATION = 'ponyconf.wsgi.application' # Database # https://docs.djangoproject.com/en/1.9/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } DEFAULT_AUTO_FIELD='django.db.models.AutoField' # Password validation # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/1.9/topics/i18n/ TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True LANGUAGES = [ ('en', _('English')), ('fr', _('French')), ] LANGUAGE_CODE = 'en-us' DEFAULT_PHONE_REGION = "US" LOCALE_PATHS = [ os.path.join(BASE_DIR, 'locale'), ] MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATIC_URL = '/static/' STATICFILES_DIRS = [ ('jquery', os.path.join(BASE_DIR, 'node_modules/jquery/dist/')), ('jquery.cookie', os.path.join(BASE_DIR, 'node_modules/jquery.cookie/')), ] LOGIN_REDIRECT_URL = 'home' SITE_ID = 1 AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', 'ponyconf.backends.EmailBackend', ] LOGOUT_REDIRECT_URL = 'home' CRISPY_TEMPLATE_PACK = 'bootstrap3' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', }, 'select2': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': 'select2', }, } SELECT2_CACHE_BACKEND = 'select2' SERVER_EMAIL = 'ponyconf@example.com' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25