Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

import environ
import logfire
import posthog
import sentry_sdk
from django.contrib.messages import constants as messages
from posthog import Posthog
from posthog.exception_capture import Integrations
from sentry_sdk.integrations.django import DjangoIntegration

BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -50,8 +47,6 @@
AWS_STORAGE_BUCKET_NAME=(str, ""),
AWS_ENDPOINT_URL=(str, ""),
S3_BUCKET=(str, ""),
POSTHOG_PROJECT_API_KEY=(str, ""),
POSTHOG_HOST=(str, "https://us.i.posthog.com"),
)

environ.Env.read_env(Path(BASE_DIR / ".env"))
Expand Down Expand Up @@ -316,6 +311,7 @@
"access_token": env("MASTODON_ACCESS_TOKEN"),
"status_message": "🚀 I created a new blog post!\n\n",
"base_url": "https://stuartm.nz/",
"microblog_category": "microblog",
},
"djpress_publish_bluesky": {
"handle": "stuartm.nz",
Expand Down Expand Up @@ -392,16 +388,3 @@
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}

# PostHog
POSTHOG_PROJECT_API_KEY = str(env("POSTHOG_PROJECT_API_KEY"))
POSTHOG_HOST = str(env("POSTHOG_HOST"))
if POSTHOG_PROJECT_API_KEY and POSTHOG_HOST:
posthog.project_api_key = POSTHOG_PROJECT_API_KEY
posthog.host = POSTHOG_HOST
Posthog(
api_key=POSTHOG_PROJECT_API_KEY,
host=POSTHOG_HOST,
enable_exception_autocapture=True,
exception_autocapture_integrations=[Integrations.Django],
)
Loading