[CI] (4c70a79) django/django3-saas - #3855
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a Django 3 SaaS application by adding the Python SDK, initializing it in
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo issues found.
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog added to requirements.txt |
| PostHog client initialized | Yes | Posthog() constructor in AccountsConfig.ready() with enable_exception_autocapture=True; atexit.register(posthog_client.shutdown) ensures flush on exit |
| capture() | Yes | 13 meaningful capture calls across accounts, billing, and dashboard views |
| identify() | N/A | Server-only app; uses identify_context() via user_logged_in signal (correct Django pattern) |
| Error tracking | Yes | enable_exception_autocapture=True in constructor + PosthogContextMiddleware captures Django view exceptions |
| Reverse proxy | N/A | Server-only app |
Issues
No issues found.
Other completed criteria
- API key loaded from
settings.POSTHOG_PROJECT_TOKEN→os.environ.get('POSTHOG_PROJECT_TOKEN'), never hardcoded - Host loaded from
settings.POSTHOG_HOST→os.environ.get('POSTHOG_HOST'), never hardcoded PosthogContextMiddlewarecorrectly placed afterAuthenticationMiddlewareinMIDDLEWAREuser_logged_insignal correctly callsidentify_context(str(user.pk))to fix context on login requests where the middleware sees an anonymous user- Person properties (
email,username,name) set viaposthog_client.set()— the correct person-property method, not in event properties - Webhook handlers (
_handle_checkout_completed,_handle_payment_failed) correctly pass explicitdistinct_id=str(user.pk)since Stripe webhooks are unauthenticated - Null-safe
if posthog_client:guards prevent crashes when PostHog is not configured - Debug-mode validation raises
RuntimeErrorif env vars are missing, preventing silent event loss during development
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
accounts/apps.py |
identify_context, set() |
Identifies user context on login via user_logged_in signal; sets person properties (email, username, name) |
accounts/views.py |
user_logged_in, user_logged_out, user_registered, account_settings_updated |
Core authentication lifecycle and profile management events |
billing/views.py |
checkout_started, subscription_activated, subscription_plan_changed, subscription_canceled, subscription_payment_failed |
Complete billing funnel from checkout through cancellation and payment failures |
dashboard/views.py |
project_created, project_updated, project_deleted |
Project CRUD operations with description metadata |
Issues
No issues found.
Other completed criteria
- Events represent real user actions mapping to actual SaaS product flows (registration → login → checkout → subscribe → manage → cancel)
- Events enable product insights: clear funnel from
user_registered→checkout_started→subscription_activated; retention viaproject_created/project_updated; churn viasubscription_canceled - Events enriched with contextual properties:
plan_slug,billing_interval,checkout_provider,activation_source,change_source,cancellation_source,has_company_name,has_description,login_method - No PII in event properties — all properties are metadata (slugs, booleans, source identifiers)
- Event names follow consistent
snake_case[noun]_[verb_past]convention: descriptive and meaningful
Reviewed by wizard workbench PR evaluator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated wizard CI run
Source: wizard-pr
Trigger ID:
4c70a79App:
django/django3-saasApp directory:
apps/django/django3-saasWorkbench branch:
wizard-ci-4c70a79-django-django3-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-09T22:13:51.245Z
Duration: 450.1s
YARA Scanner