Serve Sphinx docs from Django.
Project description
django-sphinx-docs
django-sphinx-docs allows to serve Sphinx generated docs directly from Django.
This is a fork of https://github.com/littlepea/django-docs to support Django 4.0+.
Dependencies
- Python 3.10+
- Django 3.2+
Installation
-
Install
django-sphinx-docspackage:pip install django-sphinx-docs
-
Add
django_sphinx_docstoINSTALLED_APPSinsettings.py:INSTALLED_APPS = ( ... 'django_sphinx_docs', ... )
-
Add
django_sphinx_docs.urlstourls.py:urlpatterns = [ ... path('docs/', include('django_sphinx_docs.urls')), ... ]
-
Customize configuration:
DOCS_ROOT = os.path.join(PROJECT_PATH, '../docs/_build/html') DOCS_ACCESS = 'staff'
Configuration
DOCS_ROOT (required)
Absolute path to the root directory of html docs generated by Sphinx (just like STATIC_ROOT / MEDIA_ROOT settings).
DOCS_ACCESS (optional)
Docs access level (public by default). Possible values:
public- (default) docs are visible to everyonelogin_required- docs are visible only to authenticated usersstaff- docs are visible only to staff users (user.is_staff == True)superuser- docs are visible only to superusers (user.is_superuser == True)
Running the tests
uv run pytest
Running the example project
cd example
uv run python manage.py migrate
uv run python manage.py runserver
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_sphinx_docs-0.4.1.tar.gz.
File metadata
- Download URL: django_sphinx_docs-0.4.1.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb220566ae371f958bae4cf7913371084ce03e97e3f4be31250cd53bfe55e073
|
|
| MD5 |
c149eff6f7fe9d011e384fdd4fbbd4cc
|
|
| BLAKE2b-256 |
44d61ac32ff61affc826e59f5309056cef808ee5668ddd4eb2bf334befb3ff5b
|
Provenance
The following attestation bundles were made for django_sphinx_docs-0.4.1.tar.gz:
Publisher:
publish.yml on adamghill/django-sphinx-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sphinx_docs-0.4.1.tar.gz -
Subject digest:
eb220566ae371f958bae4cf7913371084ce03e97e3f4be31250cd53bfe55e073 - Sigstore transparency entry: 973325692
- Sigstore integration time:
-
Permalink:
adamghill/django-sphinx-docs@5a5a93beba45fc8304c1909c38580d28ef453e12 -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5a5a93beba45fc8304c1909c38580d28ef453e12 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_sphinx_docs-0.4.1-py3-none-any.whl.
File metadata
- Download URL: django_sphinx_docs-0.4.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a39e7e7b92633fcad585745d4a05d4037c76025ee9eaf66b05f26f7664e846b
|
|
| MD5 |
4d22601c6de63753e452c2da1788b832
|
|
| BLAKE2b-256 |
4454fd85c5f50d6320f8bf7ac9755e8c4a409b105b148552f4adfc5f3aad0ccf
|
Provenance
The following attestation bundles were made for django_sphinx_docs-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on adamghill/django-sphinx-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sphinx_docs-0.4.1-py3-none-any.whl -
Subject digest:
8a39e7e7b92633fcad585745d4a05d4037c76025ee9eaf66b05f26f7664e846b - Sigstore transparency entry: 973325696
- Sigstore integration time:
-
Permalink:
adamghill/django-sphinx-docs@5a5a93beba45fc8304c1909c38580d28ef453e12 -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5a5a93beba45fc8304c1909c38580d28ef453e12 -
Trigger Event:
release
-
Statement type: