Ticket #866: django.views.patch

File django.views.patch, 602 bytes (added by eugene@…, 10 years ago)
  • static.py

     
    4747        raise Http404, '"%s" does not exist' % fullpath
    4848    else:
    4949        mimetype = mimetypes.guess_type(fullpath)[0]
    50         return HttpResponse(open(fullpath).read(), mimetype=mimetype)
     50        return HttpResponse(open(fullpath, 'rb').read(), mimetype=mimetype)
    5151
    5252DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
    5353<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Back to Top