开发者

Django - serving and managing permissions for static content

开发者 https://www.devze.com 2022-12-27 21:37 出处:网络
I have certain documents that I want to limit access to through Django to authorized users with permissions only.

I have certain documents that I want to limit access to through Django to authorized users with permissions only.

If I'm going to use Django as a proxy to serve static files in a view, what are the implications? I'm used to serving static files in Apache and configuring that my media is s开发者_开发问答erved without any handlers, but what happens if someone starts downloading 500mb through my Django proxy? Will my Django thread be locked for that user until he recieves the 500mb response?


See the answers to this question to learn how to tell the web server to handle serving the file.


You could use apache auth from django.contrib.auth.handlers.modpython for the permission handling.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号