On Feb 24, 8:53 am, Andy Mckay <a...@clearwind.ca> wrote:
> On 23-Feb-09, at 1:44 PM, Katja Loeffler wrote:
>
> > I have been looking for a solution to make a file download with prior
> > authentication ...
>
> > But this is not really "protected" since they can make the link public
> > once they have it and everyone can download without prior login.
>
> > I have used:
> > (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
> >         {'document_root': '/path/to/media'})
>
> You don't really want use django.views.static.serve in the real world  
> anyway, you want to use Apache. And for Apache there is an  
> Authentication handler for mod_python that allows you to authenticate  
> a request for a static file.
>
> http://docs.djangoproject.com/en/dev/howto/apache-auth/
>
> Other webservers and tools may vary.

The approach for mod_python documented in that link, and equivalent
for mod_wsgi, are only good for HTTP Basic authentication, it is no
good if you want the page to be authenticated using HTML form/cookie
based authentication as Django uses.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to