Uploading files
This commit is contained in:
236
rowsandall_app/settings.py
Normal file
236
rowsandall_app/settings.py
Normal file
@@ -0,0 +1,236 @@
|
||||
"""
|
||||
Django settings for rowsandall_app project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 1.9.5.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.9/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/1.9/ref/settings/
|
||||
"""
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
DEFAULT_CHARSET = 'UTF-8'
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'z_@2yia858=2i1cygo4ne3+14&i_&@wlty68$q1igdvn=9k5mo'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['rowsandall.com','rowsandall-1072.rostiapp.cz']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rowers',
|
||||
'cvkbrno',
|
||||
'django_rq',
|
||||
'translation_manager',
|
||||
'debug_toolbar',
|
||||
'django_mailbox',
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'rowsandall_app.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR,'templates')],
|
||||
'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',
|
||||
'django.template.context_processors.i18n',
|
||||
],
|
||||
# 'loaders': [
|
||||
# 'django.template.loaders.app_directories.Loader',
|
||||
# ],
|
||||
},
|
||||
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
WSGI_APPLICATION = 'rowsandall_app.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'rowsanda_107501',
|
||||
'USER': 'rowsanda_107501',
|
||||
'PASSWORD': 'roeidata',
|
||||
'HOST': 'store3.rosti.cz',
|
||||
'PORT': '3306',
|
||||
},
|
||||
'slave': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
},
|
||||
'TEST': {
|
||||
'CHARSET': 'utf8',
|
||||
'COLLATION': 'utf8_general_ci',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
LOCALE_PATHS = (
|
||||
os.path.join(BASE_DIR, 'locale'),
|
||||
os.path.join(BASE_DIR, 'cvkbrno/locale'),
|
||||
)
|
||||
|
||||
LANGUAGES = (
|
||||
('cs',_(u'Czech')),
|
||||
('nl',_(u'Dutch'))
|
||||
)
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
LANGUAGE_COOKIE_NAME = 'wm_lang'
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
||||
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'),
|
||||
os.path.join(BASE_DIR, 'static/plots'),]
|
||||
|
||||
|
||||
BROKER_URL = 'redis://localhost:6379/0'
|
||||
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
||||
CELERY_IGNORE_RESULT = False
|
||||
|
||||
CELERY_ACCEPT_CONTENT = ['json']
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_RESULT_SERIALIZER = 'json'
|
||||
CELERY_TRACK_STARTED = True
|
||||
CELERY_SEND_TASK_SENT_EVENT = True
|
||||
|
||||
# user authentication
|
||||
|
||||
# user authentication
|
||||
LOGIN_REDIRECT_URL = '/rowers/list-workouts/'
|
||||
LOGIN_URL = '/login/'
|
||||
|
||||
# Concept 2
|
||||
C2_CLIENT_ID = "bgTBbmjSyn8wbJb0JEdlYjDUfSZFAPQSzJV8YDwH"
|
||||
C2_CLIENT_SECRET = "HD6HnEu8bFWGkrpGoa89kliXhofLzAHzllltWMPg"
|
||||
C2_REDIRECT_URI = "http://rowsandall.com/call_back"
|
||||
|
||||
# Strava
|
||||
|
||||
STRAVA_CLIENT_ID = "11567"
|
||||
STRAVA_CLIENT_SECRET = "9e55d439879e1da6724e75e4a3220b35a493fe24"
|
||||
STRAVA_REDIRECT_URI = "http://rowsandall.com/stravacall_back"
|
||||
|
||||
# SportTracks
|
||||
|
||||
SPORTTRACKS_CLIENT_ID = "rowingdata"
|
||||
SPORTTRACKS_CLIENT_SECRET = "3GZVXH8GB4PZQHPD"
|
||||
SPORTTRACKS_REDIRECT_URI = "http://rowsandall.com/sporttracks_callback"
|
||||
|
||||
# RQ stuff
|
||||
|
||||
RQ_QUEUES = {
|
||||
'default': {
|
||||
'HOST': 'localhost',
|
||||
'PORT': 6379,
|
||||
'DB': 0,
|
||||
# 'PASSWORD': 'some-password',
|
||||
'DEFAULT_TIMEOUT': 360,
|
||||
},
|
||||
'low': {
|
||||
'HOST': 'localhost',
|
||||
'PORT': 6379,
|
||||
'DB': 0,
|
||||
# 'PASSWORD': 'some-password',
|
||||
'DEFAULT_TIMEOUT': 360,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
#SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
|
||||
#SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
|
||||
|
||||
# email stuff
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_HOST = 'mail.rosti.cz'
|
||||
EMAIL_PORT = '25'
|
||||
EMAIL_HOST_USER = 'info@rowsandall.com'
|
||||
EMAIL_HOST_PASSWORD = 'lnD3mbZ1NoI8RK1StOdO'
|
||||
EMAIL_USE_TLS = True
|
||||
|
||||
# weather stuff
|
||||
|
||||
FORECAST_IO_KEY = "bc8196fbd89f11375c7dfc8aa6323c72"
|
||||
GMAPIKEY = "AIzaSyAgu1w9QSthaGPMLp8y9JedPoMc9sfEgJ8"
|
||||
Reference in New Issue
Block a user