What problem does it solve?
When a Django model's writes must appear in PostHog's Activity side panel or advanced activity logs, developers need to wire up ModelActivityMixin, signal receivers, scope enums, and bulk-write logging correctly—missing any step produces a silently incomplete audit trail.
Core Features & Use Cases
- Write-path auditing: Enumerates every write path (save, QuerySet.update, bulk_create, webhooks, tasks) so no change goes unlogged.
- Receiver and scope wiring: Guides adding ModelActivityMixin, ActivityScope entries in backend and frontend, a receiver module imported in apps.py ready(), and the repo-invariant baseline entry.
- Bulk writes and separate databases: Covers manual bulk_log_activity calls and passing using=router.db_for_write for products routed to their own database.
- Use Case: You add a new product model and need every create, update, and delete to show who changed what in the Activity panel, including changes made by background jobs.
Quick Start
Add activity logging to my Django model so all of its writes appear in the PostHog activity log.