Skip to content

Custom Directives for use in ReST files with Sphinx, to automate creation of some documentation

Notifications You must be signed in to change notification settings

jrcartee/django-sphinx-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-sphinx-ext

Custom Directives for use in ReST files with Sphinx, to automate creation of some documentation. Contains the following directives:

  • pyexec -- executes arbitrary python code, and redirects stdout to your generated doc
  • formdoc -- builds a table describing all your django form's fields (works for django-rest-framework serializers too!)
  • viewdoc -- uses django's reverse to print the url for each view, using its name given in your urls.py files

Dependencies

  • Python 2.7
  • Django 1.6
  • Sphinx
  • Tabulate

Setup

In your Sphinx project's conf.py:

sys.path.insert(0, os.path.abspath('/path/to/your/django_project/'))
sys.path.insert(0, os.path.abspath('/path/to/this/cloned/repo/'))

extensions = [
    'pyexec',
    'viewdoc',
    'formdoc'
]

About

Custom Directives for use in ReST files with Sphinx, to automate creation of some documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages