1
votes

I'm trying to combine Sphinx on my Django development server. I know i could better use apache. But I can't use apache due to the fact that the project will be managed by someone else and the project needs to work as simple as possible. Without too many external libraries etc.

So i tried django-docs package and django.static.serve in my url. The HTML pages work, only the look of the pages is just plain html so the CSS isn't included. The documentation on django-docs is really bad and i can't seem to get it to work with the static files Sphinx created. I can't use sphinxdocs as well since it needs haystacks which will add to my external libraries.

I added django-docs to my installed apps and added this to my settings. With projectpath being the path to where my conf.py is located. I'm not sure if the location is right though. But the documentation isn't really clear at what i should fill in on the project path part. And i added the urls in my urlspatterns

DOCS_ROOT = os.path.join(PROJECT_PATH, '../docs/_build/html')
DOCS_ACCESS = 'staff'

url(r'^docs/', include('docs.urls')),

In sphinx doc the static files are located in the docs/_build/html/_static

1

1 Answers

1
votes

I found the problem If anyone else has the issue. I had some other folders called static inside my docs folder. When i removed them it worked. So it was just me being a bit stupid.