Autodoc all modules from a Django project's INSTALLED_APPS for Sphinx
Original code is from https://github.com/Aquasys/django-sphinx-autodoc This version has been cleaned up and modified to work as a Django management command.
Django is very nice in that way you can reuse a lot of applications in your projects. It means for big projects that you’ll get a long list of applications in your settings.INSTALLED_APP.
If you’re using Django with Sphinx and want to autodoc all these apps in a wink of an eye, then this app is for you.
It will scrape all your .py files in each application listed by INSTALLED_APPS, then add automodules in your PROJECT/SPHINX_ROOT/auto_modules.rst.
You will then see your applications grouped in 2 different categories:
Add a docstring in your application’s __init__.py file to describe it. django-giza will automatically scrape it for you (although __init.__.py files are excluded by default…)
$ pip install django-giza
Then add giza to your INSTALLED_APPS in settings.py
$ ./manage.py giza
You can also specify the relative path to your docs root:
$ ./manage.py giza private/documentation
You can modify some of the settings used by django-giza:
Root path for documentation (absolute path required).
Name of your master document.
Name for the generated modules doc.
Title for the modules page.
Title for the internal apps section.
Title for the external apps section.
"3rd Party Apps"
List of applications to exclude. Can use wildcard at the end.
defaults to: ["django.*", "giza"]
List of filenames to exclude.
defaults to: ["__init__.py"]
List of options to the automodule directive, such as “private-members” (without colon delimiters)
["deprecated", "members", "private-members", "special-members", "show-inheritance"]