1

Well, this is the case, I have a lot of document html pages generated by doxygen, I would like to integrate the pages with my django pages, so I could view it from the webpage. Well, as there are so many document html files, it would be impossible to set the static path of each file. Is there a way to set the static file path that the document pages would be loaded without modification?

1 Answer 1

1

You can serve static files using:

from django.conf import settings
...
(r'^my-pages/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': "/path/to/html/files"}),

But be careful since using django for serving static files is not recommended for production sites. You should be serving them using your webserver (apache? nginx? etc)

Sign up to request clarification or add additional context in comments.

1 Comment

you mean when configured integrated with apache, the django doesn't need to set the static path ? just use the httpd.conf path is OK?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.