Re: HttpResponseSendFile

2006-06-16 Thread dougn
Before I get into the details, I think I should introduce myself. My name is Doug Napoleone and I have only been using django for about 6 months. I worked on the PyCon06 PyCon-Tech project and am trying to kick off the PyCon07 tech work. http://wiki.python.org/moin/PyCon2006/PyConSoftwareTalk htt

Re: HttpResponseSendFile

2006-06-15 Thread Adrian Holovaty
On 6/14/06, SmileyChris <[EMAIL PROTECTED]> wrote: > I realise there are better ways to send most files. I ask about this > because I'm looking at implementing that "special case" soon > (authenticating files via logged in user in Django), and I was just > wondering about ways to do it. May I int

Re: HttpResponseSendFile

2006-06-14 Thread SmileyChris
Ivan Sagalaev wrote: > The regular HttpResponse already can serve files in some fashion: > > f = open(filename) > return HttpResponse(f, mimetype='application/octet-stream') > > Here the file-like object will work as an iterator sending one line at > a time. Thanks Ivan, this alleviates

Re: HttpResponseSendFile

2006-06-14 Thread Ivan Sagalaev
SmileyChris wrote: > I don't want to go reopening the ticket, but couldn't this still be > useful functionality? > The regular HttpResponse already can serve files in some fashion: f = open(filename) return HttpResponse(f, mimetype='application/octet-stream') Here the file-like object

Re: HttpResponseSendFile

2006-06-14 Thread SmileyChris
I realise there are better ways to send most files. I ask about this because I'm looking at implementing that "special case" soon (authenticating files via logged in user in Django), and I was just wondering about ways to do it. --~--~-~--~~~---~--~~ You received

Re: HttpResponseSendFile

2006-06-14 Thread James Bennett
On 6/14/06, SmileyChris <[EMAIL PROTECTED]> wrote: > I don't want to go reopening the ticket, but couldn't this still be > useful functionality? Well, I can certainly see Adrian's point in that ticket; Django really isn't meant for handling static files, which is why there are huge warnings all o

HttpResponseSendFile

2006-06-14 Thread SmileyChris
(oops, posted this before in the django users group) I noticed http://code.djangoproject.com/ticket/2131 was marked as a wontfix today with the comment, "Django isn't meant to serve static files". I don't want to go reopening the ticket, but couldn't this still be useful functionality? What if I