--- id: sphinxcontrib-django version: "2.5" license: Apache2 2.0 License license_treatment: permissive maintenance: active --- # sphinxcontrib-django — Improve the Sphinx autodoc for Django classes. License: permissive · Maintenance: active · Downloads: 122.1K/mo ## What it is and what it does sphinxcontrib-django is a Sphinx extension designed to make Django application documentation more complete and readable. It hooks into Sphinx's autodoc system to automatically extract and display Django model and form fields as class parameters, improve how those fields are represented in the generated docs, and create intelligent links between related and reverse-related fields. It also hides internal Django implementation details that clutter documentation (like declared_fieldsets and Meta classes) and adds information about autogenerated methods. The extension is configured by adding it to your Sphinx conf.py alongside a django_settings module path. It provides custom text roles for cross-referencing Django documentation (settings, template tags, filters, field lookups) and Sphinx internals (events, config values), and includes optional features like displaying database table names and controlling how many field choices to show. It handles Django setup during the documentation build process and emits a django-configured event so you can run custom initialization code safely. Use it for: - Generate complete API documentation for Django models that automatically lists all fields and their types without manual effort. - Create cross-referenced Django project documentation where field relationships link directly to the related model classes. - Build cleaner autodoc output by filtering out internal Django implementation details that add noise to generated docs. - Document custom Django admin forms and model fields with improved field representations and metadata. - Set up monkeypatching or custom initialization during documentation builds via the django-configured event hook. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Sphinx extension that enhances autodoc output for Django classes by listing model and form fields as parameters, improving field representations, and adding cross-reference roles for Django and Sphinx documentation. Yes. This is a stable, actively maintained extension for a common use case—documenting Django projects with Sphinx. It has low install friction, no known vulnerabilities, permissive licensing, and solves a real problem (Django's internal structure makes vanilla autodoc output cluttered and incomplete). Install it if you're using Sphinx to document a Django application. ## Install pip install sphinxcontrib-django uv add sphinxcontrib-django poetry add sphinxcontrib-django ## Installing sphinxcontrib-django Before you install: Low friction installation with only three runtime dependencies (Django, Sphinx, pprintpp). Actively maintained as of 2026-07-20 with a stable release history since 2017-12-07, supporting modern Python versions (3.8 through 3.11) and recent Django versions (3.2, 4.1, 4.2). License in practice: Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install sphinxcontrib-django # In your Sphinx conf.py: import sys, os sys.path.insert(0, os.path.abspath("../src")) extensions = ["sphinxcontrib_django"] django_settings = "myapp.settings" Requires Django settings module to be configured; the extension emits a django-configured event after django.setup() completes for custom initialization code. Verify before relying: - Whether the package works with Django versions beyond 4.2 or Python versions beyond 3.11. - Performance impact when documenting large Django projects with many models and fields. - Compatibility with recent Sphinx versions not explicitly listed in classifiers. ## Package facts - License: Apache2 2.0 License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 122.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sphinx django autodoc extension, django model documentation generator, sphinx django field documentation, improve django class docs, sphinx django integration, django model field autodoc, sphinx extension django apps, django-docs, sphinx-extension [View on SkillFed](https://skillfed.io/packages/sphinxcontrib-django) · [View on PyPI](https://pypi.org/project/sphinxcontrib-django/)