Pull requests

#59 Declined
Repository
jbzdak/django-registration-hg django-registration-hg
Branch
default
Repository
ubernostrum/django-registration django-registration
Branch
default

Enable Python 3.3 if django 1.5 is installed

Author
  1. Jacek Bzdak
Reviewers
Description

Django-registeration did not work in python3 because of change in string types, basically earlier version worked only because in python 2.X str type could be casted to binary data and

hashlib.sha(hashlib.sha(...).hexdigest() + ...)

were legal. Since logic of str(random.random()) was werid I replaced it.

Another thing that needed to be fixed was usage of unicode and str I used binary_type and text_type from six compatibility layer. I have provided fallback for users with django < 1.5 (in this case we assume they use python 2.7).

After this change I managed to succesfully register on python 3.3, so I guess there are no other incompatibilities.

Comments (6)