Skip to main content

Autodoc all apps from a project to Sphinx

Project description

Django is awesome 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.

How it works

It will scrape all your .py files in each application listed by INSTALLED_APP, then add automodules in your DS_ROOT/modules.rst.

Settings

You can modify some of the settings used by django-sphinx-autodoc:

  • DS_ROOT: root path for documentation (default to project_dir/doc)
  • DS_MASTER_DOC: name of your master document (default to “index.rst”)
  • DS_FILENAME: name for the modules (default to “auto_modules.rst”)
  • DS_EXCLUDED_APPS: list of applications to exclude (default to [])
  • DS_EXCLUDED_MODULES: list of files to exclude (default to [“__init__.py”])

TODO

v1

  • Include external apps (currently only internal apps, located in the project root directory)
  • Write tests
  • improve the not_relevant stuff to auto exclude a file without class or def

v2

Django command extension to update the autodoc

Project details


Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page