Adds correlation IDs (CID) to Django requests for tracing and debugging. Currently at version 3.0, requires Python >=3.8. Active development with periodic releases.
pip install django-cidVerified import paths — ran on the pinned version, not inferred.
Basic setup: add middleware and use get_cid() to retrieve the correlation ID.
Replace 'cid.middleware.CIDMiddleware' with 'cid.middleware.CorrelationIdMiddleware' in MIDDLEWARE settings.
Change 'from cid.utils import get_cid' to 'from cid import get_cid'.
Pass cid to template context manually: context['cid'] = get_cid(request).
Ensure CorrelationIdMiddleware is early in the MIDDLEWARE list (e.g., after CommonMiddleware but before SessionMiddleware).