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
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)
1 Comment
charlie cui
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?