Serve static files in a better way
def sphinx_serve(request, slug, type_, path): isn't following Django's best practices for static content.
Static content shouldn't even be served by Django, and django-sphinxdoc is encouraging this bad practice. Also, things like "collectstatic" to get all static files and store them in a different domain (Amazon S3, dedicated varnish server for static files, CDN, etc. as explained here) won't work.
The sphinx_serve view uses a highly descouraged Django feature, from django's documentation:
During development, this will be done automatically if you use runserver and DEBUG is set to True (see django.contrib.staticfiles.views.serve()).
This method is grossly inefficient and probably insecure, so it is unsuitable for production.
A potential solution would be to: * Remove the sphinx_serve view * Override the collectstatic management command to fetch the files from the sphinx projects configured in the DB (this would be good for production environments) into the "static" folder configured in settings.py
There was an interesting discussion about collectstatic in the django-developers mailing list.
Still unsure how to fix this for dev environment (runserver) but someone with more django experience will figure it out :)