On Sun, 2007-05-27 at 13:34 -0700, itsnotvalid wrote:
> I got an error when I am using admin interface to submit some forms as
> following the Django book (CH6).
> 
> When the form in admin interface saving.
[... snip...]
> 
>   UnicodeDecodeError at /admin/books/author/add/
>   'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in
> range(128)
> 
> Not sure if that is only my n00b skillz kicking on, it should be a
> direct result of the return string as here:
> 
> from django.db import models
> # ...
> class Author(models.Model):
>     salutation = models.CharField(maxlength=10)
>     first_name = models.CharField(maxlength=30)
>     last_name = models.CharField(maxlength=40)
>     email = models.EmailField()
>     headshot = models.ImageField(upload_to= ('/tmp'))
>     class Admin:
>         pass
> 
>     def __unicode__(self):
>         return self.first_name # this string is what I am talking
> about

That was a little bit of a tricky example. The problem only occurs when
a file upload field is included in the form, which is why I'd never seen
it before.

Should be fixed in [5373].

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to