#2131: [patch] HttpResponseSendFile for serving static files handler-specific
sendfile mechanism
-----------------------------------------------+----------------------------
          Reporter:  ymasuda[at]ethercube.com  |         Owner:  alsleme
            Status:  new                       |     Milestone:         
         Component:  Core framework            |       Version:  SVN    
        Resolution:                            |      Keywords:         
             Stage:  Design decision needed    |     Has_patch:  1      
        Needs_docs:  0                         |   Needs_tests:  1      
Needs_better_patch:  0                         |  
-----------------------------------------------+----------------------------
Comment (by mizatservercave):

 Reformatting the example since formatting got munged in the previous
 update.

 {{{
 from django.http import HttpResponseSendFile
 r = HttpResponseSendFile('./bigfile')
 t = open('/tmp/test', 'wb')
 t.write(r.content)
 t.close()

 # md5 and filesize of ./bigfile and /tmp/test match.
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2131#comment:26>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to