views:

117

answers:

2

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 served 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?

+1  A: 

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

Ignacio Vazquez-Abrams
Great stuff! I liked Graham's convo you linked. I think I'll try to get X-Sendfile plugged on Apache to restrict the access to the files.
kRON
Wasn't me though, but thanks.
Ignacio Vazquez-Abrams
A: 

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

aeby