Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added an import that was missed in [8193]. Thanks Karen Tracey. Fixed…

… #8143.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit afa98dba98e3ba7ccf77ec9ec41eb12b162ab76f 1 parent 169b889
@malcolmt malcolmt authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/regressiontests/file_uploads/views.py
View
6 tests/regressiontests/file_uploads/views.py
@@ -1,9 +1,9 @@
import os
-import sha
from django.core.files.uploadedfile import UploadedFile
from django.http import HttpResponse, HttpResponseServerError
from django.utils import simplejson
from uploadhandler import QuotaUploadHandler
+from django.utils.hashcompat import sha_constructor
def file_upload_view(request):
"""
@@ -39,9 +39,9 @@ def file_upload_view_verify(request):
continue
submitted_hash = form_data[key + '_hash']
if isinstance(value, UploadedFile):
- new_hash = sha.new(value.read()).hexdigest()
+ new_hash = sha_constructor(value.read()).hexdigest()
else:
- new_hash = sha.new(value).hexdigest()
+ new_hash = sha_constructor(value).hexdigest()
if new_hash != submitted_hash:
return HttpResponseServerError()
Please sign in to comment.
Something went wrong with that request. Please try again.