Tomas Gavenciak
10 years ago
6 changed files with 182 additions and 195 deletions
@ -0,0 +1,171 @@ |
|||||
|
""" |
||||
|
Django settings for mamweb project. |
||||
|
|
||||
|
For more information on this file, see |
||||
|
https://docs.djangoproject.com/en/1.7/topics/settings/ |
||||
|
|
||||
|
For the full list of settings and their values, see |
||||
|
https://docs.djangoproject.com/en/1.7/ref/settings/ |
||||
|
""" |
||||
|
|
||||
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
||||
|
import os |
||||
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
||||
|
|
||||
|
|
||||
|
# Quick-start development settings - unsuitable for production |
||||
|
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ |
||||
|
|
||||
|
# SECURITY WARNING: keep the secret key used in production secret! |
||||
|
SECRET_KEY = ')^u=i65*zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzv9l+zo)n' |
||||
|
|
||||
|
# SECURITY WARNING: don't run with debug turned on in production! |
||||
|
DEBUG = True |
||||
|
|
||||
|
TEMPLATE_DEBUG = True |
||||
|
|
||||
|
ALLOWED_HOSTS = [] |
||||
|
|
||||
|
|
||||
|
AUTHENTICATION_BACKENDS = ( |
||||
|
# Needed to login by username in Django admin, regardless of `allauth` |
||||
|
'django.contrib.auth.backends.ModelBackend', |
||||
|
# `allauth` specific authentication methods, such as login by e-mail |
||||
|
'allauth.account.auth_backends.AuthenticationBackend', |
||||
|
) |
||||
|
|
||||
|
|
||||
|
|
||||
|
# Application definition |
||||
|
|
||||
|
SITE_ID = 1 |
||||
|
|
||||
|
ROOT_URLCONF = 'mamweb.urls' |
||||
|
|
||||
|
WSGI_APPLICATION = 'mamweb.wsgi.application' |
||||
|
|
||||
|
|
||||
|
# Internationalization |
||||
|
# https://docs.djangoproject.com/en/1.7/topics/i18n/ |
||||
|
|
||||
|
LANGUAGE_CODE = 'cs' |
||||
|
|
||||
|
TIME_ZONE = 'Europe/Prague' |
||||
|
|
||||
|
USE_I18N = False |
||||
|
|
||||
|
USE_L10N = True |
||||
|
|
||||
|
USE_TZ = True |
||||
|
|
||||
|
|
||||
|
# Static files (CSS, JavaScript, Images) |
||||
|
# https://docs.djangoproject.com/en/1.7/howto/static-files/ |
||||
|
|
||||
|
STATIC_URL = '/static/' |
||||
|
MEDIA_URL = '/media/' |
||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') |
||||
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static') |
||||
|
|
||||
|
STATICFILES_DIRS = ( |
||||
|
os.path.join(BASE_DIR, 'mamweb', 'static'), |
||||
|
) |
||||
|
|
||||
|
STATICFILES_FINDERS = ( |
||||
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
||||
|
'django.contrib.staticfiles.finders.FileSystemFinder', |
||||
|
) |
||||
|
|
||||
|
TEMPLATE_LOADERS = ( |
||||
|
'django.template.loaders.filesystem.Loader', |
||||
|
'django.template.loaders.app_directories.Loader', |
||||
|
'django.template.loaders.eggs.Loader' |
||||
|
) |
||||
|
|
||||
|
MIDDLEWARE_CLASSES = ( |
||||
|
'django.contrib.sessions.middleware.SessionMiddleware', |
||||
|
'django.middleware.common.CommonMiddleware', |
||||
|
'django.middleware.csrf.CsrfViewMiddleware', |
||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware', |
||||
|
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
||||
|
'django.contrib.messages.middleware.MessageMiddleware', |
||||
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
||||
|
) |
||||
|
|
||||
|
TEMPLATE_CONTEXT_PROCESSORS = ( |
||||
|
'django.contrib.auth.context_processors.auth', |
||||
|
'django.contrib.messages.context_processors.messages', |
||||
|
'django.core.context_processors.i18n', |
||||
|
'django.core.context_processors.debug', |
||||
|
'django.core.context_processors.request', |
||||
|
'django.core.context_processors.media', |
||||
|
'django.core.context_processors.csrf', |
||||
|
'django.core.context_processors.tz', |
||||
|
'sekizai.context_processors.sekizai', |
||||
|
'django.core.context_processors.static', |
||||
|
'allauth.account.context_processors.account', |
||||
|
'allauth.socialaccount.context_processors.socialaccount', |
||||
|
) |
||||
|
|
||||
|
|
||||
|
INSTALLED_APPS = ( |
||||
|
'django.contrib.admin', |
||||
|
'django.contrib.auth', |
||||
|
'django.contrib.contenttypes', |
||||
|
'django.contrib.sessions', |
||||
|
'django.contrib.messages', |
||||
|
'django.contrib.sites', |
||||
|
'django.contrib.staticfiles', |
||||
|
|
||||
|
'sekizai', |
||||
|
'reversion', |
||||
|
|
||||
|
'allauth', |
||||
|
'allauth.account', |
||||
|
'allauth.socialaccount', |
||||
|
# 'allauth.socialaccount.providers.facebook', |
||||
|
# 'allauth.socialaccount.providers.openid', |
||||
|
'allauth.socialaccount.providers.google', |
||||
|
|
||||
|
|
||||
|
'mamweb', |
||||
|
'seminar', |
||||
|
) |
||||
|
|
||||
|
# Database |
||||
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases |
||||
|
|
||||
|
DATABASES = { |
||||
|
'default': { |
||||
|
# 'ENGINE': 'django.db.backends.postgresql_psycopg2', |
||||
|
# 'NAME': 'mam', |
||||
|
# 'USER': 'mam', |
||||
|
# }, |
||||
|
# 'test': { |
||||
|
'ENGINE': 'django.db.backends.sqlite3', |
||||
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
SOCIALACCOUNT_QUERY_EMAIL = True |
||||
|
SOCIALACCOUNT_PROVIDERS = { |
||||
|
'google': { |
||||
|
'SCOPE': ['profile', 'email'], |
||||
|
'AUTH_PARAMS': { 'access_type': 'online' } |
||||
|
}, |
||||
|
'facebook': { |
||||
|
'SCOPE': ['email', 'publish_stream'], |
||||
|
'METHOD': 'js_sdk', |
||||
|
'VERIFIED_EMAIL': True, |
||||
|
} |
||||
|
} |
||||
|
ACCOUNT_AUTHENTICATION_METHOD = 'username_email' |
||||
|
ACCOUNT_EMAIL_REQUIRED = True |
||||
|
SOCIALACCOUNT_EMAIL_REQUIRED = True |
||||
|
|
||||
|
# MaM specific |
||||
|
|
||||
|
SEMINAR_RESENI_DIRNAME = 'reseni' |
||||
|
|
||||
|
|
@ -0,0 +1,2 @@ |
|||||
|
from .settings import * |
||||
|
|
@ -0,0 +1,2 @@ |
|||||
|
from .settings import * |
||||
|
|
Loading…
Reference in new issue