djangopackages-zz / djangopackages

Django Packages - a place to review Django apps, frameworks, and projects.
http://djangopackages.com
MIT License
53 stars 40 forks source link

docs_figure out how to pull docstrings into sphinx #118

Open ideabrian opened 13 years ago

ideabrian commented 13 years ago

I'm on this right now.

ideabrian commented 13 years ago

"For this to work, the docstrings must of course be written in correct reStructuredText. You can then use all of the usual Sphinx markup in the docstrings, and it will end up correctly in the documentation. "

http://sphinx.pocoo.org/ext/autodoc.html#module-sphinx.ext.autodoc

ideabrian commented 13 years ago

The module or the package must be in one of the directories on sys.path – adapt your sys.path in the configuration file accordingly.

ideabrian commented 13 years ago

autodoc provides several directives that are versions of the usual py:module, py:class

On parsing, they import the corresponding module and extract the docstring of the given objects.

They insert them into the page source under a suitable py:module, py:class etc. directive