Skip to content

Update Python framework docs#16929

Merged
marandaneto merged 1 commit into
masterfrom
docs/update-python-framework-guides
May 21, 2026
Merged

Update Python framework docs#16929
marandaneto merged 1 commit into
masterfrom
docs/update-python-framework-guides

Conversation

@marandaneto
Copy link
Copy Markdown
Member

@marandaneto marandaneto commented May 20, 2026

Changes

follow up #16888

  • Update Django and Flask Python SDK docs to mention error tracking support and Python 7.x version requirements.
  • Refresh Django setup examples to use the global posthog client configured from AppConfig, with context identification guarded by request.user.is_authenticated.
  • Document Django context middleware behavior for authenticated users, request metadata, sanitized tracing headers, exception capture, and sync/async support.
  • Add a Flask request context example for sharing identity, session IDs, and request tags across captures.
  • Fix Flask snippets so examples define app = Flask(__name__).

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json

@marandaneto marandaneto requested a review from a team May 20, 2026 14:09
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview May 20, 2026 02:27PM

@github-actions
Copy link
Copy Markdown
Contributor

Vale prose linter → found 3 errors, 14 warnings, 1 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/libraries/django.mdx — 1 errors, 6 warnings, 0 suggestions
Line Severity Message Rule
8:18 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
8:141 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
8:156 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
16:55 error Use straight quotes and apostrophes, not curly ones. PostHogDocs.CurlyQuotes
23:6 warning Use 'Django' instead of 'django'. Vale.Terms
77:108 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
81:33 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/libraries/flask.mdx — 2 errors, 7 warnings, 0 suggestions
Line Severity Message Rule
6:18 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
6:140 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
6:155 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
12:55 error Use straight quotes and apostrophes, not curly ones. PostHogDocs.CurlyQuotes
76:4 warning 'Error tracking' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
76:4 warning Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. PostHogBase.ProductNames
80:54 error Use straight quotes and apostrophes, not curly ones. PostHogDocs.CurlyQuotes
86:107 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
91:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/libraries/python/_snippets/django-context-middleware.mdx — 0 errors, 1 warnings, 1 suggestions
Line Severity Message Rule
5:252 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
42:76 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames

@marandaneto marandaneto merged commit e0025c7 into master May 21, 2026
20 checks passed
@marandaneto marandaneto deleted the docs/update-python-framework-guides branch May 21, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants