How to view the HTML Sphinx generates in Django?
django, python-sphinx
Solution
url(r'^docs/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.DOCS_ROOT}),
url(r'^docs/', 'django.views.static.serve', {'document_root': settings.DOCS_ROOT, 'path': 'index.html'}),
Where settings.DOCS_ROOT is an absolute path to your docs/_build/html directory generated by Sphinx.
There's a reusable app for exactly this purpose: django-docs ;)
Problem
OK - I have a Django project that I want to document -- so I installed Sphinx. The install went fine, and I can ouput all the HTML to a `_build` folder. But... The question is: how do I actually view my documentation in a browser? Is it assumed that the documentation will not be viewed within the Django project but in its own website? If viewed within the Django project, do I need to set up a `url` pattern to handle the documentation? I'm a little bit confused how to actually view this information in my browser within the Django project.