Re: Serving binary files "through" django

2008-04-07 Thread Eric Abrahamsen
> 1. Frontend-Proxy and static file server (i.e. Nginx od lighttpd) >if URL matches local file or rule: serve it >else: request file from Backend-Server (i.e. Apache) > 2. Backend Server >handle urls as in urls.py or your resolving strategy and serve > dynamic Data accordingly. > > In

Re: Serving binary files "through" django

2008-04-07 Thread Thomas Kerpe
Hi Eric Am 06.04.2008 um 06:49 schrieb Eric Abrahamsen: > > Guess I'll have to serve the files from django's apache, not my other > media server, but it seems like this will do it. That depends on your setup. You can also use a X-Sendfile or X-Accel-Redirect capable Server as your frontend-Pr

Re: Serving binary files "through" django

2008-04-06 Thread Tim Sawyer
On Saturday 05 Apr 2008, Matthias Kestenholz wrote: > On Sat, 2008-04-05 at 20:19 +0100, Tim Sawyer wrote: > > Hi Folks, > > > > I'd like to have a site that gives away and sells PDFs, and tracks > > downloads of those PDFs. For example, I'd like to know the IP > > address/useragent of who downlo

Re: Serving binary files "through" django

2008-04-05 Thread Eric Abrahamsen
Sorry, wrote too soon. http://tn123.ath.cx/mod_xsendfile/ Guess I'll have to serve the files from django's apache, not my other media server, but it seems like this will do it. E On Apr 6, 12:25 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > > If you are using Apache or lighttpd as a fronten

Re: Serving binary files "through" django

2008-04-05 Thread Eric Abrahamsen
> If you are using Apache or lighttpd as a frontend-proxy you can use a > similar aproach with: X-Sendfile. I'd like to do something along these lines as well – keep files in a protected directory and only allow them to be served if Django says so. I'm serving static media from a different do

Re: Serving binary files "through" django

2008-04-05 Thread Thomas Kerpe
Hello Tim Am 05.04.2008 um 21:19 schrieb Tim Sawyer: > > I'd like to have a site that gives away and sells PDFs, and tracks > downloads > of those PDFs. I hope I got your question right. I have a little bit different aproach since django never serves the file directly. If you are using ngin

Re: Serving binary files "through" django

2008-04-05 Thread Matthias Kestenholz
On Sat, 2008-04-05 at 20:19 +0100, Tim Sawyer wrote: > Hi Folks, > > I'd like to have a site that gives away and sells PDFs, and tracks downloads > of those PDFs. For example, I'd like to know the IP address/useragent of who > downloaded the free files, and I'd like to record the same plus th

Re: Serving binary files "through" django

2008-04-05 Thread [EMAIL PROTECTED]
You would do something like this: http://www.djangoproject.com/documentation/outputting_pdf/ but instead of generating the pdf you could just serve a file object. On Apr 5, 2:19 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I'd like to have a site that gives away and sells PDFs, and

Serving binary files "through" django

2008-04-05 Thread Tim Sawyer
Hi Folks, I'd like to have a site that gives away and sells PDFs, and tracks downloads of those PDFs. For example, I'd like to know the IP address/useragent of who downloaded the free files, and I'd like to record the same plus the logged in user for the pay ones (after authenticating the us