Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored August 08, 2008
6  tests/regressiontests/file_uploads/views.py
... ...
@@ -1,9 +1,9 @@
1 1
 import os
2  
-import sha
3 2
 from django.core.files.uploadedfile import UploadedFile
4 3
 from django.http import HttpResponse, HttpResponseServerError
5 4
 from django.utils import simplejson
6 5
 from uploadhandler import QuotaUploadHandler
  6
+from django.utils.hashcompat import sha_constructor
7 7
 
8 8
 def file_upload_view(request):
9 9
     """
@@ -39,9 +39,9 @@ def file_upload_view_verify(request):
39 39
             continue
40 40
         submitted_hash = form_data[key + '_hash']
41 41
         if isinstance(value, UploadedFile):
42  
-            new_hash = sha.new(value.read()).hexdigest()
  42
+            new_hash = sha_constructor(value.read()).hexdigest()
43 43
         else:
44  
-            new_hash = sha.new(value).hexdigest()
  44
+            new_hash = sha_constructor(value).hexdigest()
45 45
         if new_hash != submitted_hash:
46 46
             return HttpResponseServerError()
47 47
 

0 notes on commit afa98db

Please sign in to comment.
Something went wrong with that request. Please try again.