# django-doc-view: The simplest way to document your Django APIs
[](https://github.com/ocavue/django-doc-view/blob/master/LICENSE)
[](https://github.com/ambv/black)
[](https://pypi.org/project/django-doc-view)
`django-doc-view` find view's docsting and output them in shell after formatting.
## Installation
```bash
pip3 install django-doc-view
```
## Base Usage
Add `django_doc_view` to your INSTALLED_APPS setting:
```python
# settings.py
INSTALLED_APPS = (
...
'django_doc_view'
)
```
Then you can get the result by doc_view command:
```bash
python3 manage.py doc_view
```
## Example
```python
def index(request):
"""
A example of Function-based view
"""
return HttpResponse("Hello, world. You're at the polls index.")
class User(View):
"""
A example of Class-based view
method:
get
request:
id
"""
def get(self, request, *args, **kwargs):
...
```
```bash
$ python3 manage.py doc_view
## polls/
A example of Function-based view
## polls/user
A example of Class-based view
method:
get
request:
id
```
You can find a runnable example from [here](https://github.com/ocavue/django-doc-view-emample).
[](https://github.com/ocavue/django-doc-view/blob/master/LICENSE)
[](https://github.com/ambv/black)
[](https://pypi.org/project/django-doc-view)
`django-doc-view` find view's docsting and output them in shell after formatting.
## Installation
```bash
pip3 install django-doc-view
```
## Base Usage
Add `django_doc_view` to your INSTALLED_APPS setting:
```python
# settings.py
INSTALLED_APPS = (
...
'django_doc_view'
)
```
Then you can get the result by doc_view command:
```bash
python3 manage.py doc_view
```
## Example
```python
def index(request):
"""
A example of Function-based view
"""
return HttpResponse("Hello, world. You're at the polls index.")
class User(View):
"""
A example of Class-based view
method:
get
request:
id
"""
def get(self, request, *args, **kwargs):
...
```
```bash
$ python3 manage.py doc_view
## polls/
A example of Function-based view
## polls/user
A example of Class-based view
method:
get
request:
id
```
You can find a runnable example from [here](https://github.com/ocavue/django-doc-view-emample).
Release files for django-doc-view 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_doc_view-0.1.3.tar.gz | 3.2 kB | Details |
Release files / django_doc_view-0.1.3.tar.gz
| Download URL | django_doc_view-0.1.3.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb2fd15fbac484af9d93636184cf5e209288b18430455da2efeb33e2f122f832
|
|
BLAKE2b-256 checksum How to use checksums |
d5857b7f35a75163373cd118ec6365f7f90ad95d15e446f4e060d8762d0e5c7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |