From 1a1d888da433d1e5d5a1e2bffef8c2f280114a54 Mon Sep 17 00:00:00 2001 From: Anna Grund Date: Mon, 10 Jul 2023 21:10:45 +0300 Subject: [PATCH] [AJP-2] Add allowed hosts --- .gitignore | 2 +- ajapaik/settings/local.py | 77 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 ajapaik/settings/local.py diff --git a/.gitignore b/.gitignore index 4b2e66f5c..9086ac79c 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/ajapaik/settings/local.py +#/ajapaik/settings/local.py /ajapaik/settings/test.py /media/ diff --git a/ajapaik/settings/local.py b/ajapaik/settings/local.py new file mode 100644 index 000000000..f8bda47da --- /dev/null +++ b/ajapaik/settings/local.py @@ -0,0 +1,77 @@ +from ajapaik.settings.default import * + +DATABASES = { + 'default': { + 'ENGINE': 'django.contrib.gis.db.backends.postgis', + 'NAME': 'postgres', + 'USER': 'postgres', + 'PASSWORD': 'postgres', + 'HOST': 'db' + } +} + +ALLOWED_HOSTS = [ + 'localhost', + '0.0.0.0', + 'anna.ajapaik.ee' +] + +SECRET_KEY = 'zek%+^%%7#^&rqgjoa_b^jdvw+4g7mt_@)^j07j774tq%4f-d5' + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'filename': 'debug.log', + }, + }, + 'loggers': { + 'django.request': { + 'handlers': ['file'], + 'level': 'DEBUG', + 'propagate': True, + }, + }, +} + +GOOGLE_API_KEY = 'YOUR_KEY' +GOOGLE_CLIENT_ID = 'YOUR_ID' +GOOGLE_ANALYTICS_KEY = 'UA-21689048-2' +GOOGLE_PLUS_OAUTH2_CALLBACK_URL = 'http://localhost:8000/oauth2callback' + +FLICKR_API_KEY = 'YOUR_KEY' +FLICKR_API_SECRET = 'YOUR_SECRET' + +FACEBOOK_APP_KEY = 'YOUR_KEY' +FACEBOOK_APP_SECRET = 'YOUR_SECRET' +FACEBOOK_APP_ID = '201052296573134' + +SITE_ID = 2 + +DEBUG = True + +CSRF_COOKIE_SECURE = False +SESSION_COOKIE_SECURE = False + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = 'smtp.mailtrap.io' +EMAIL_PORT = 25 +EMAIL_HOST_USER = '590e8a199b417a' +EMAIL_HOST_PASSWORD = 'YOUR_PASSWORD' +EMAIL_USE_TLS = False + +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + } +} + +SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error'] + +RECAPTCHA_PUBLIC_KEY = 'not-so-seekrit' +RECAPTCHA_PRIVATE_KEY = 'seekrit' + +GOOGLE_MAPS_API_KEY = ''