Ticket #866: django.views.patch
File django.views.patch, 602 bytes (added by , 19 years ago) |
---|
-
static.py
47 47 raise Http404, '"%s" does not exist' % fullpath 48 48 else: 49 49 mimetype = mimetypes.guess_type(fullpath)[0] 50 return HttpResponse(open(fullpath ).read(), mimetype=mimetype)50 return HttpResponse(open(fullpath, 'rb').read(), mimetype=mimetype) 51 51 52 52 DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ 53 53 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">