#5811: newforms UnicodeDecodeError when displaying ValidationError strings in
unicode
-------------------------------------------------+--------------------------
Reporter:  Mike Maravillo <[EMAIL PROTECTED]>  |       Owner:  nobody           
                                           
  Status:  new                                   |   Component:  
Internationalization                                        
 Version:  SVN                                   |    Keywords:  
UnicodeDecodeError newforms ascii codec ordinal not in range
   Stage:  Unreviewed                            |   Has_patch:  1              
                                             
-------------------------------------------------+--------------------------
 {{{
 UnicodeDecodeError at /users/add_edit/1/
 'ascii' codec can't decode byte 0xe3 in position 26: ordinal not in
 range(128)
 Request Method:         POST
 Request URL:    http://192.168.0.1:8080/users/add_edit/1/
 Exception Type:         UnicodeDecodeError
 Exception Value:        'ascii' codec can't decode byte 0xe3 in position
 26: ordinal not in range(128)
 Exception Location:     /usr/lib/python2.3/site-
 packages/django/newforms/forms.py in _html_output, line 147
 Python Executable:      /usr/bin/python
 Python Version:         2.3.4
 }}}

 I'm getting the above error with the following code, when secret !=
 secret2...

 {{{
     def clean_password(self):
         if self.data['secret'] != self.data['secret2']:
             raise forms.ValidationError(_('Passwords are not the same'))
         return self.data['secret']

     def clean(self,*args, **kwargs):
         self.clean_password()
         return super(UserForm, self).clean(*args, **kwargs)
 }}}

 The attached patch is just a quick fix.  I'm not really sure if this
 affects anything else since I'm just new to Django... Thanks.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5811>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to