Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Django settings for myproject project.
- For more information on this file, see
- https://docs.djangoproject.com/en/1.8/topics/settings/
- For the full list of settings and their values, see
- https://docs.djangoproject.com/en/1.8/ref/settings/
- """
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- import os
- DJ_PROJECT_DIR = os.path.dirname(__file__)
- BASE_DIR = os.path.dirname(DJ_PROJECT_DIR)
- WSGI_DIR = os.path.dirname(BASE_DIR)
- REPO_DIR = os.path.dirname(WSGI_DIR)
- DATA_DIR = os.environ.get('OPENSHIFT_DATA_DIR', BASE_DIR)
- import sys
- sys.path.append(os.path.join(REPO_DIR, 'libs'))
- import secrets
- SECRETS = secrets.getter(os.path.join(DATA_DIR, 'secrets.json'))
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = SECRETS['secret_key']
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = os.environ.get('DEBUG') == 'True'
- from socket import gethostname
- ALLOWED_HOSTS = [
- gethostname(), # For internal OpenShift load balancer security purposes.
- os.environ.get('OPENSHIFT_APP_DNS'), # Dynamically map to the OpenShift gear name.
- #'example.com', # First DNS alias (set up in the app)
- #'www.example.com', # Second DNS alias (set up in the app)
- ]
- EMAIL_HOST = 'smtp.gmail.com'
- EMAIL_HOST_USER = 'majorkeyeecs@gmail.com'
- EMAIL_HOST_PASSWORD = 'shakeelali'
- EMAIL_PORT = 587
- EMAIL_USE_TLS = True
- # Application definition
- INSTALLED_APPS = (
- 'store',
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'rest_framework',
- )
- 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',
- )
- # GETTING-STARTED: change 'myproject' to your project name:
- ROOT_URLCONF = 'webgroup.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',
- ],
- },
- },
- ]
- WSGI_APPLICATION = 'webgroup.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- # GETTING-STARTED: change 'db.sqlite3' to your sqlite3 database:
- 'NAME': os.path.join(DATA_DIR, 'db.sqlite3'),
- }
- }
- # Internationalization
- # https://docs.djangoproject.com/en/1.8/topics/i18n/
- LANGUAGE_CODE = 'en-us'
- TIME_ZONE = 'UTC'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.8/howto/static-files/
- STATIC_URL = '/static/'
- STATIC_ROOT = os.path.join(WSGI_DIR, 'static')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement