On Apr 30, 3:39 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Although Django can be hosted on WSGI, I am not sure if it makes use > of this if it is available. I know it is mentioned in django/core/ > servers/basehttp.py, and that there are are means of specifying > platform specific ways of sending files, but does it actually get used > if it is available. That is a question I'd like to know as well > because if Django uses wsgi.file_wrapper automatically already, I > could advertise it as another benefit of mod_wsgi. :-)
Wow, thanks for the clue! Apparently following works as expected with Django included dev server (so for sure works with mod_wsgi!): f = open("/path/to/some/file.zip") response = HttpResponse(f, mimetype='application/zip') response['Content-Disposition'] = 'attachment; filename=foo.zip' return response I think it should be included in the docs... --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---