""" 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/ """ from .settings import * import sys try: use_sqlite = CFG['use_sqlite'] except KeyError: # pragma: no cover use_sqlite = False for element in sys.argv: if 'test' in element: TESTING = True if TESTING or use_sqlite: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 'HOST': 'localhost', 'USER': '', 'PASSWORD': 'roeidata', 'PORT': '3306', }, # 'TEST': { # 'CHARSET': 'utf8', # 'COLLATION': 'utf8_general_ci', # }, # 'slave': { # 'ENGINE': 'django.db.backends.mysql', # 'NAME': 'rowsanda_107501', # 'USER': 'rowsanda_107501', # } } 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 # GDAL_LIBRARY_PATH = 'C:/OSGeo4W64/bin/' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'dunav.ngrok.io'] # INSTALLED_APPS += ['debug_toolbar',] # INSTALLED_APPS += ["sslserver"] # MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware',] CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': os.path.join(BASE_DIR, 'django_cache'), } } # Application definition STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR # STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'static/plots'), ] INTERNAL_IPS = ['127.0.0.1'] MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') LOGIN_REDIRECT_URL = '/rowers/list-workouts/' SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" SITE_URL = "http://localhost:8000" # EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' # EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_BACKEND = 'django_ses.SESBackend' AWS_SES_REGION_NAME = 'eu-west-1' AWS_SES_REGION_ENDPOINT = 'email.eu-west-1.amazonaws.com' EMAIL_HOST = CFG['aws_smtp'] EMAIL_PORT = CFG['aws_port'] EMAIL_HOST_USER = CFG['aws_smtp_username'] EMAIL_HOST_PASSWORD = CFG['aws_smtp_password'] EMAIL_USE_TLS = CFG['email_use_tls'] DEFAULT_FROM_EMAIL = 'info@rowsandall.com' SETTINGS_NAME = 'rowsandall_app.settings_dev'