* remove email verification related code * remove email verification related code * remove sendgrid callback * remove sendgrid related code * remove sendgrid related code * rename sendgrid app to email * remove email from built-in channels * remove email from built-in channels * remove email from built-in channels * add email backend: https://github.com/grafana/oncall/pull/50 * add email templater * add email templater * convert md to html * add email settings to live settings * use task to send email, handle some exceptions to create logs * remove ERROR_NOTIFICATION_MAIL_DELIVERY_FAILED usage * add email limit logic * fix tests * add docs * remove old email templates * remove old email templates * add template_fields to messaging backend * add messaging backends templates to public api * add comment for deprecated fields * fix test * fix tests * disable email by default * don't retry on SMTPException and TimeoutError * add tests * bring email back to public api docs * return ERROR_NOTIFICATION_MAIL_LIMIT_EXCEEDED * make template_fields tuple * build_subject_and_title -> build_subject_and_message * add one more comment about template deprecation * use 8 as backend id * add comment about gaierror and BadHeaderError * add comment on importing in notify_user_async * edit oss docs
42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
# flake8: noqa
|
|
|
|
from .base import *
|
|
|
|
SECRET_KEY = "u5/IIbuiJR3Y9FQMBActk+btReZ5oOxu+l8MIJQWLfVzESoan5REE6UNSYYEQdjBOcty9CDak2X"
|
|
|
|
MIRAGE_SECRET_KEY = "V9u7DqZ6SrZHP+SvBT19dbB85NZJGgllpwYQ77BSr9kZ6n8ggXMfGd4sCll1TDcAPEolbVD8YbF"
|
|
MIRAGE_CIPHER_IV = "X+VFcDqtxJ5bbU+V"
|
|
|
|
BASE_URL = "http://localhost"
|
|
|
|
if DATABASE_TYPE == DatabaseTypes.SQLITE3:
|
|
DATABASES["default"]["NAME"] = DATABASE_NAME or "oncall_ci.db"
|
|
else:
|
|
DATABASES["default"] |= {
|
|
"NAME": DATABASE_NAME or "oncall_local_dev",
|
|
"USER": DATABASE_USER or DATABASE_DEFAULTS[DATABASE_TYPE]["USER"],
|
|
"PASSWORD": DATABASE_PASSWORD or "local_dev_pwd",
|
|
"HOST": DATABASE_HOST or f"{DATABASE_TYPE}_test",
|
|
"PORT": DATABASE_PORT or DATABASE_DEFAULTS[DATABASE_TYPE]["PORT"],
|
|
}
|
|
|
|
if BROKER_TYPE == BrokerTypes.RABBITMQ:
|
|
CELERY_BROKER_URL = "amqp://rabbitmq:rabbitmq@rabbit_test:5672"
|
|
elif BROKER_TYPE == BrokerTypes.REDIS:
|
|
CELERY_BROKER_URL = REDIS_URI
|
|
|
|
# use redis as cache and celery broker on CI tests
|
|
if BROKER_TYPE != BrokerTypes.REDIS:
|
|
CACHES = {
|
|
"default": {
|
|
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
|
}
|
|
}
|
|
|
|
# Dummy Telegram token (fake one)
|
|
TELEGRAM_TOKEN = "0000000000:XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXX"
|
|
|
|
TWILIO_ACCOUNT_SID = "dummy_twilio_account_sid"
|
|
TWILIO_AUTH_TOKEN = "dummy_twilio_auth_token"
|
|
|
|
EXTRA_MESSAGING_BACKENDS = [("apps.base.tests.messaging_backend.TestOnlyBackend", 42)]
|