Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty
- export MYPROJECT_SECRET_KEY="very_long_fake_key"
- #mod_wsgi
- LoadModule wsgi_module modules/mod_wsgi.so
- WSGIScriptAlias / /home/shgr/projects/autozap/autozap/wsgi.py
- WSGIPythonHome /home/shgr/.virtualenvs/autozap
- WSGIPythonPath /home/shgr/projects/autozap/
- <Directory /home/shgr/projects/autozap/autozap>
- <Files wsgi.py>
- Require all granted
- </Files>
- </Directory>
- Alias /robots.txt /home/shgr/projects/autozap/static/robots.txt
- #Alias /favicon.ico /home/shgr/projects/autozap/favicon.ico
- Alias /media/ /home/shgr/projects/autozap/media/
- Alias /static/ /home/shgr/projects/autozap/static/
- <Directory /home/shgr/projects/autozap/static>
- Require all granted
- </Directory>
- <Directory /home/shgr/projects/autozap/media>
- Require all granted
- </Directory>
- #import_files
- Alias /import_files /home/shgr/projects/autozap/webdata/import_files
- <Directory /home/shgr/projects/autozap/webdata/import_files>
- Require all granted
- </Directory>
- import os
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
- REACT_APP_DIR = os.path.join(BASE_DIR, 'frontend')
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- #SECRET_KEY = os.environ.get("AUTOZAP_SECRET_KEY")
- SECRET_KEY = "$hg@z4nus7^6!s7d-ku4ahjew_@!+&u1+*s7sq1--fake-fake"
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = False
- # Application definition
- INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'rest_framework',
- 'website',
- ]
- # 'django.middleware.csrf.CsrfViewMiddleware'
- MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- ]
- ROOT_URLCONF = 'autozap.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 = 'autozap.wsgi.application'
- # Password validation
- # https://docs.djangoproject.com/en/1.11/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.11/topics/i18n/
- LANGUAGE_CODE = 'ru-ru'
- TIME_ZONE = 'Asia/Krasnoyarsk'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.11/howto/static-files/
- STATIC_URL = '/static/'
- STATIC_ROOT = 'static'
- REST_FRAMEWORK = {
- 'UPLOADED_FILES_USE_URL': False
- }
- from autozap.settings.base import *
- import os
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = False
- ALLOWED_HOSTS = [
- 'fake.com',
- 'localhost',
- ]
- #send_mail
- EMAIL_HOST = 'smtp.yandex.ru'
- EMAIL_PORT = 465
- EMAIL_HOST_USER = "fake@yandex.ru"
- EMAIL_USE_SSL = True
- EMAIL_HOST_PASSWORD = "fakefake"
- # Database
- # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'autozap',
- 'USER': 'root',
- 'PASSWORD': 'fake-fake',
- 'HOST': 'localhost',
- 'PORT': '3307',
- 'sql_mode': 'STRICT_TRANS_TABLES',
- }
- }
- from autozap.settings.base import *
- import os
- DEBUG=True
- ALLOWED_HOSTS = [
- 'localhost'
- ]
- INSTALLED_APPS += [
- 'django.contrib.staticfiles'
- ]
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'autozap',
- 'USER': 'fake',
- 'PASSWORD': 'fakfake',
- 'HOST': 'localhost',
- 'PORT': '',
- 'sql_mode': 'STRICT_TRANS_TABLES',
- }
- }
- #send_mail
- EMAIL_HOST = 'smtp.yandex.ru'
- EMAIL_PORT = 465
- EMAIL_HOST_USER = "fake@yandex.ru"
- EMAIL_USE_SSL = True
- EMAIL_HOST_PASSWORD = "fakfake"
- STATICFILES_DIRS = [
- os.path.join(REACT_APP_DIR, 'build', 'static')
- ]
Add Comment
Please, Sign In to add comment