Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Django settings for seven project.
- For more information on this file, see
- https://docs.djangoproject.com/en/dev/topics/settings/
- For the full list of settings and their values, see
- https://docs.djangoproject.com/en/dev/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/dev/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = 'em3s&20x$!&q!7k6*3(1m6d%-zwzb9)iqrvqd%sphhe_tm@4%6'
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = True
- TEMPLATE_DEBUG = True
- ALLOWED_HOSTS = []
- # Application definition
- INSTALLED_APPS = (
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'django.contrib.sites',
- 'profiles',
- 'allauth',
- 'allauth.account',
- #'allauth.socialaccount',
- #'allauth.socialaccount.providers.facebook',
- )
- SITE_ID = 1
- LOGIN_URL = "/accounts/login/"
- LOGIN_REDIRECT_URL = "/"
- ACCOUNT_AUTHENTICATION_METHOD = "username_email"
- ACCOUNT_CONFIRM_EMAIL_ON_GET = False
- ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = LOGIN_URL
- ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = LOGIN_REDIRECT_URL
- ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 10
- ACCOUNT_EMAIL_REQUIRED = True
- ACCOUNT_EMAIL_VERIFICATION = None
- ACCOUNT_EMAIL_SUBJECT_PREFIX = "Subject is: "
- ACCOUNT_LOGOUT_ON_GET = True
- ACCOUNT_LOGOUT_REDIRECT_URL = LOGIN_URL
- ACCOUNT_SIGNUP_FORM_CLASS = None
- ACCOUNT_SIGNUP_PASSWORD_VERIFICATION =True
- ACCOUNT_UNIQUE_EMAIL = True
- ACCOUNT_USER_MODEL_USERNAME_FIELD ="username"
- ACCOUNT_USER_MODEL_EMAIL_FIELD = "email"
- ACCOUNT_USERNAME_MIN_LENGTH =4
- ACCOUNT_USERNAME_REQUIRED =True
- ACCOUNT_PASSWORD_INPUT_RENDER_VALUE =False
- ACCOUNT_PASSWORD_MIN_LENGTH =6
- ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION =True
- 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',
- )
- ROOT_URLCONF = 'seven.urls'
- WSGI_APPLICATION = 'seven.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/dev/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
- # Internationalization
- # https://docs.djangoproject.com/en/dev/topics/i18n/
- LANGUAGE_CODE = 'en-us'
- TIME_ZONE = 'UTC'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- TEMPLATE_CONTEXT_PROCESSORS =(
- "django.contrib.auth.context_processors.auth",
- "django.core.context_processors.debug",
- "django.core.context_processors.i18n",
- "django.core.context_processors.media",
- "django.core.context_processors.static",
- "django.core.context_processors.tz",
- "django.contrib.messages.context_processors.messages",
- "django.core.context_processors.request",
- "allauth.account.context_processors.account",
- #"allauth.socialaccount.context_processors.socialaccount",
- )
- 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",
- )
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/dev/howto/static-files/
- STATIC_URL = '/static/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement