I have a django project, which I document using reST in docstrings to do the following:
My documentation shows up properly within IDE (PyCharm), however I can't configure Sphinx to generate HTML documentation for me.
Here is the structure of my project
+--------------------------------------------+
| /saassapp # django project path |
| /docs # dir for sphinx |
| conf.py # sphinx config file |
| ... |
| settings.py # django settings |
| /studyview # django app |
| ...
| ... |
+--------------------------------------------+
Any ideas? An examle of the conf.py file would be very useful. Thank you.
EDIT
My project name is saassapp and the module I am trying to make a doc for is called studyview.
conf.py
file: http://pastebin.com/HTYdc1rRindex
file: http://pastebin.com/bu1r38TQmake html
: http://pastebin.com/MWJj94EEThe migration features introduced in Django 1.7 prevents the previous answers from working on newer versions. Instead you will have to do a manual setup. Analogous to all previous answers you'll first have to make sure Django can find your settings, and then call django.setup()
which will load the settings and setup your models. Add this to your Sphinx project's conf.py:
os.environ['DJANGO_SETTINGS_MODULE'] = 'projectname.settings'
import django
django.setup()