Skip to main content

Serve your Sphinx docs with Django.

Project description

django-sphinx-view

Serve your Sphinx docs with Django.

Current status: pre-alpha. You're far too early. 😀

Basic Usage

Build your Sphinx docs with the JSONBuilder, using make json.

Provide a sphinx_view/page.html template. This package will ship one in a later version.

Route a DocumentationView with a Path to the output json.

from pathlib import Path

from django.urls import path
from sphinx_view import DocumentationView

urlpatterns = [
    # ...
    path(
        "docs<path:path>",
        DocumentationView.as_view(
            json_build_dir=Path('/path/to/output/json')
        ),
        name="documentation",
    ),
    # ...
]

Enjoy.

You can subclass DocumentationView to require authentication and so add access control, and so on. You can customise the template to add other dynamic elements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sphinx-view-21.1a3.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

django_sphinx_view-21.1a3-py2.py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page