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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-sphinx-view-21.1a2.tar.gz
.
File metadata
- Download URL: django-sphinx-view-21.1a2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40c9fa167d6507eb3bd2c6b21935133f38a59cf8c36f445eb53483cc015fa439 |
|
MD5 | 8f80f45e2b71161d4e6478aacf357901 |
|
BLAKE2b-256 | 8d6541a571c46dcde2fd086f65608e786d5cddabf930eda203b202d405d3f033 |
File details
Details for the file django_sphinx_view-21.1a2-py2.py3-none-any.whl
.
File metadata
- Download URL: django_sphinx_view-21.1a2-py2.py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800e73ad197de29d2030eb76d2dffb1749de9e0e697998a79d7604e8c8479bbc |
|
MD5 | db3479ab604e2220628bfc8842ca966a |
|
BLAKE2b-256 | 145967fa98ca22e4a99ad21a862f0a27d9e011368b15d32d3cd4a7ee4b60e4b0 |