ubernostrum / django-registration

A user-registration application for Django.

follow

Traceback:

1
2
3
4
File "/usr/lib/python2.5/site-packages/django_registration-0.7-py2.5.egg/registration/models.py", line 141, in create_profile
   activation_key = sha.new(salt+user.username).hexdigest()

UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-10: ordinal not in range(128)

Problem:

sha1 work only with string and not support unicode.

Solution:

1) Replace user.username to user.email.

2) or use smart_str (as this done in django.contrib.auth.models.get_hexdigest):

1
activation_key = sha.new(salt + smart_str(user.username)).hexdigest()
Status: resolved Responsible: James Bennett / ubernostrum Type: bug
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

Add comment / attachment

Show/hide preview

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?