|
4 | 4 |
|
5 | 5 | import environ |
6 | 6 | import logfire |
7 | | -import posthog |
8 | 7 | import sentry_sdk |
9 | 8 | from django.contrib.messages import constants as messages |
10 | | -from posthog import Posthog |
11 | | -from posthog.exception_capture import Integrations |
12 | 9 | from sentry_sdk.integrations.django import DjangoIntegration |
13 | 10 |
|
14 | 11 | BASE_DIR = Path(__file__).resolve().parent.parent |
|
50 | 47 | AWS_STORAGE_BUCKET_NAME=(str, ""), |
51 | 48 | AWS_ENDPOINT_URL=(str, ""), |
52 | 49 | S3_BUCKET=(str, ""), |
53 | | - POSTHOG_PROJECT_API_KEY=(str, ""), |
54 | | - POSTHOG_HOST=(str, "https://us.i.posthog.com"), |
55 | 50 | ) |
56 | 51 |
|
57 | 52 | environ.Env.read_env(Path(BASE_DIR / ".env")) |
|
316 | 311 | "access_token": env("MASTODON_ACCESS_TOKEN"), |
317 | 312 | "status_message": "🚀 I created a new blog post!\n\n", |
318 | 313 | "base_url": "https://stuartm.nz/", |
| 314 | + "microblog_category": "microblog", |
319 | 315 | }, |
320 | 316 | "djpress_publish_bluesky": { |
321 | 317 | "handle": "stuartm.nz", |
|
392 | 388 | "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", |
393 | 389 | }, |
394 | 390 | } |
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