Filip Dupanović
Filip Dupanović

Reputation: 33670

Django - serving and managing permissions for static content

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?

Upvotes: 8

Views: 6380

Answers (2)

Reto Aebersold
Reto Aebersold

Reputation: 16624

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

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798814

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

Upvotes: 3

Related Questions