您的网页可能具有的任何静态文件都应由您的网络服务器提供,例如, Apache的。除非必须阻止某些文件访问某些人,否则Django不应该参与其中。
这里,I found an example of how to do it:
# our production setup includes a caching load balancer in front.
# we tell the load balancer to cache for 5 minutes.
# we can use the commented out lines to tell it to not cache,
# which is useful if we're updating.
<FilesMatch "\.(html|js|png|jpg|css)$">
ExpiresDefault "access plus 5 minutes"
ExpiresActive On
#Header unset cache-control:
#Header append cache-control: "no-cache, must-revalidate"
</FilesMatch>
静态文件应由要么阿帕奇/ lighthttpd/...你使用什么都Web服务器提供服务... – shahjapan 2010-10-21 06:53:52