Password protect content

22 views
Skip to first unread message

Andrew S

unread,
Nov 2, 2015, 12:08:53 PM11/2/15
to Django users
Hello,

I have a folder full of HTML files that will reside on a subdomain.

I would like to password protect these with user accounts etc.


Can this be easily completed with Django? is there any packages that already do this?



Andrew

Aaron C. de Bruyn

unread,
Nov 2, 2015, 12:18:17 PM11/2/15
to django...@googlegroups.com
You might want to check out Apache .htaccess files for securing the files.
Django sounds like it might be overkill for password protecting files.

-A
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/25c9b615-5cfd-492b-b8f4-a6571fa982d7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Russell Keith-Magee

unread,
Nov 2, 2015, 4:59:58 PM11/2/15
to Django Users
Hi Andrew,

Yes, and Yes.

The magic keyword you’re missing is X-SENDFILE - it’s a HTTP header that lets Django manage authentication, but your static file server handle delivering the actual content.

Here’s a blog post to show you how to set it up.


Yours,
Russ Magee %-) 

John

unread,
Nov 2, 2015, 7:54:45 PM11/2/15
to django...@googlegroups.com
This is really cool, something I didn't know existed and something I will use immediately. Thanks.

John
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages