KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm serving "sensitive" information in downloadable PDF's and Spreadsheets within a user registration section of a site. Is there a way to allow the django authentication to secure this media without serving it (and not have to manually login using basic auth)? I'm guessing theres (fingers crossed) not a way to do it with the psuedo code below, but it helps better illustrate the end goal. #urls.py (r'^protected_media/(?P<filename>.*)$', 'protected_media') #views.py from django.contrib.auth.decorators import login_required @login_required def protected_media(request, filename): # @login_required bounces you out to the login url # if logged in, serve "filename" from Apache
Tags (comma-separated)
Save Edits
Cancel