Skip to content

Commit 29e723e

Browse files
Merge pull request #234 from stuartmaxwell:updates
Bump dependencies and enable microblog support to Mastodon
2 parents 9a8a433 + 1e78250 commit 29e723e

File tree

2 files changed

+190
-189
lines changed

2 files changed

+190
-189
lines changed

config/settings.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44

55
import environ
66
import logfire
7-
import posthog
87
import sentry_sdk
98
from django.contrib.messages import constants as messages
10-
from posthog import Posthog
11-
from posthog.exception_capture import Integrations
129
from sentry_sdk.integrations.django import DjangoIntegration
1310

1411
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -50,8 +47,6 @@
5047
AWS_STORAGE_BUCKET_NAME=(str, ""),
5148
AWS_ENDPOINT_URL=(str, ""),
5249
S3_BUCKET=(str, ""),
53-
POSTHOG_PROJECT_API_KEY=(str, ""),
54-
POSTHOG_HOST=(str, "https://us.i.posthog.com"),
5550
)
5651

5752
environ.Env.read_env(Path(BASE_DIR / ".env"))
@@ -316,6 +311,7 @@
316311
"access_token": env("MASTODON_ACCESS_TOKEN"),
317312
"status_message": "🚀 I created a new blog post!\n\n",
318313
"base_url": "https://stuartm.nz/",
314+
"microblog_category": "microblog",
319315
},
320316
"djpress_publish_bluesky": {
321317
"handle": "stuartm.nz",
@@ -392,16 +388,3 @@
392388
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
393389
},
394390
}
395-
396-
# PostHog
397-
POSTHOG_PROJECT_API_KEY = str(env("POSTHOG_PROJECT_API_KEY"))
398-
POSTHOG_HOST = str(env("POSTHOG_HOST"))
399-
if POSTHOG_PROJECT_API_KEY and POSTHOG_HOST:
400-
posthog.project_api_key = POSTHOG_PROJECT_API_KEY
401-
posthog.host = POSTHOG_HOST
402-
Posthog(
403-
api_key=POSTHOG_PROJECT_API_KEY,
404-
host=POSTHOG_HOST,
405-
enable_exception_autocapture=True,
406-
exception_autocapture_integrations=[Integrations.Django],
407-
)

0 commit comments

Comments
 (0)