django application for documentation
Project description
Add dj_docs to the INSTALLED_APPS
INSTALLED_APPS = [
# ...
'dj_docs',
]
Your settings.py file should now include dj_docs in the INSTALLED_APPS list. This will enable the dj_docs app in your Django project.
Configuration for DOC_STRING_MODULES
The DOC_STRING_MODULES setting in Django’s settings.py file allows you to define documentation strings for your project’s modules, classes, and functions.
To configure DOC_STRING_MODULES, add the following code to your settings.py file:
DOC_STRING_MODULES = [
{
"section": "enter title",
"modules": [
{
"module_name": "module",
"class": "module.class",
"function": "module.function",
"synopsis": "Description"
},
]
},
]
Replace "enter title" with the title of the page you want to add, "module" with the name of the module you want to document, "module.class" with the name of the class you want to document, "module.function" with the name of the function you want to document, and "Description" with the description of the module, class, or function.
You can add as many sections and modules as you need to document your project.
Adding the Documentation URL Path
To access the documentation for this Django app, you’ll need to add a URL path to your urls.py file that includes the dj_docs app’s URLs. Follow these steps:
from django.urls import include # Import the `include` function from Django's `urls` module
urlpatterns = [
# ...
path('docs/', include('dj_docs.urls')), # add url for documentation url to django application
]
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 dj_docs-0.1.tar.gz.
File metadata
- Download URL: dj_docs-0.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
191d368c2b2dc2599c6361783993641231362dbbf3861cdaddcaebc08b42ba89
|
|
| MD5 |
c68e41585ddfb3e7af7a3aad512ec2be
|
|
| BLAKE2b-256 |
7f7228381eb47af10bcdebc55627a08b48dbee25e55ed97dd2e798119496f844
|
File details
Details for the file dj_docs-0.1-py3-none-any.whl.
File metadata
- Download URL: dj_docs-0.1-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec2770112cfb51ec2207a4cda705aaa8a76f2025afb20c7723a4e0f77e781bd
|
|
| MD5 |
1350b13268a542d69247b44dfda52e08
|
|
| BLAKE2b-256 |
744dd85eff10c8f8ea7206867f7d998e9ef89224252cb8d174797d4a6e5d0e1d
|