Skip to content

Commit

Permalink
Another take on problem with hashing in Python 3 (close #33).
Browse files Browse the repository at this point in the history
  • Loading branch information
zlorf committed Jun 2, 2016
1 parent 5bcd8bb commit 4107ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbsettings/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def get_db_prep_save(self, value):
if not value:
return None

hashed_name = md5(six.binary_type(time.time())).hexdigest() + value.name[-4:]
hashed_name = md5(six.text_type(time.time()).encode()).hexdigest() + value.name[-4:]
image_path = pjoin(self._upload_to, hashed_name)
dest_name = pjoin(settings.MEDIA_ROOT, image_path)
directory = pjoin(settings.MEDIA_ROOT, self._upload_to)
Expand Down

0 comments on commit 4107ebd

Please sign in to comment.