2020-08-26 10:34:57 +02:00
|
|
|
"""
|
|
|
|
Django settings for PostHog Enterprise Edition.
|
|
|
|
"""
|
2020-12-04 19:54:27 +01:00
|
|
|
import os
|
2020-12-16 14:54:30 +01:00
|
|
|
from typing import Dict, List
|
2020-10-22 18:46:33 +02:00
|
|
|
|
2020-12-09 13:57:12 +01:00
|
|
|
from posthog.constants import RDBMS
|
|
|
|
from posthog.settings import PRIMARY_DB, TEST
|
2020-08-26 10:34:57 +02:00
|
|
|
|
2021-02-02 16:03:01 +01:00
|
|
|
# Zapier REST hooks
|
2020-10-22 18:46:33 +02:00
|
|
|
HOOK_EVENTS: Dict[str, str] = {
|
2020-08-26 10:34:57 +02:00
|
|
|
# "event_name": "App.Model.Action" (created/updated/deleted)
|
|
|
|
"action_defined": "posthog.Action.created_custom",
|
|
|
|
"action_performed": "posthog.Action.performed",
|
|
|
|
"annotation_created": "posthog.Annotation.created_custom",
|
|
|
|
}
|
|
|
|
HOOK_FINDER = "ee.models.hook.find_and_fire_hook"
|
|
|
|
HOOK_DELIVERER = "ee.models.hook.deliver_hook_wrapper"
|
2020-09-24 12:14:17 +02:00
|
|
|
|
2021-02-02 16:03:01 +01:00
|
|
|
# Social auth
|
|
|
|
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = os.getenv("SOCIAL_AUTH_GOOGLE_OAUTH2_KEY")
|
|
|
|
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.getenv("SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET")
|
|
|
|
if "SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS" in os.environ:
|
|
|
|
SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS: List[str] = os.environ[
|
|
|
|
"SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS"
|
|
|
|
].split(",")
|
2020-12-16 14:54:30 +01:00
|
|
|
|
2021-02-02 16:03:01 +01:00
|
|
|
# ClickHouse and Kafka
|
2021-07-13 15:13:45 +02:00
|
|
|
CLICKHOUSE_DENORMALIZED_PROPERTIES: list = (
|
|
|
|
os.getenv("CLICKHOUSE_DENORMALIZED_PROPERTIES", "").split(",")
|
|
|
|
if os.getenv("CLICKHOUSE_DENORMALIZED_PROPERTIES")
|
|
|
|
else []
|
|
|
|
)
|
2021-02-02 16:03:01 +01:00
|
|
|
KAFKA_ENABLED = PRIMARY_DB == RDBMS.CLICKHOUSE and not TEST
|