#3924: Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3
in position 8: ordinal not in range(128)
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: hugo
Status: reopened | Component:
Internationalization
Version: SVN | Resolution:
Keywords: | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------------------+--------------------------------------
Old description:
> Hello, after update the django code from svn, my admin site doesn´t work.
> The error is : Caught an exception while rendering: 'ascii' codec can't
> decode byte 0xc3 in position 8: ordinal not in range(128).
>
> My models.py has a correct coding declaration, it is # -*- coding: UTF-8
> -*-. My admin site allways works with previous svn revisions but it
> doesn´t work with the latest revision 4926 from the developer code. I´m
> working with language-code "es-es".
>
> The problem is related with the use of non-ascii characters as the return
> value of __str__ with models.ForeignKey and models.ManyToManyField.
>
> Thank you very much.
>
> Below youd can find a piece of code.
>
>
> UnicodeDecodeError at /admin/articulos/articulo/add/
> 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in
> range(128)
> Request Method: GET
> Request URL: http://www..../admin/articulos/articulo/add/
> Exception Type: UnicodeDecodeError
> Exception Value: 'ascii' codec can't decode byte 0xc3 in position
> 8: ordinal not in range(128)
> Exception Location: /home/rubenper/django/django/oldforms/__init__.py
> in render, line 490
> Template error
>
> In template
> /home/rubenper/django/django/contrib/admin/templates/widget/foreign.html,
> error at line 2
> Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3
> in position 8: ordinal not in range(128)
> 1 {% load admin_modify adminmedia %}
> 2 {% output_all bound_field.form_fields %}
New description:
Hello, after update the django code from svn, my admin site doesn´t work.
The error is : Caught an exception while rendering: 'ascii' codec can't
decode byte 0xc3 in position 8: ordinal not in range(128).
My models.py has a correct coding declaration, it is # -*- coding: UTF-8
-*-. My admin site allways works with previous svn revisions but it
doesn´t work with the latest revision 4926 from the developer code. I´m
working with language-code "es-es".
The problem is related with the use of non-ascii characters as the return
value of {{{__str__}}} with models.!ForeignKey and
models.!ManyToManyField.
Thank you very much.
Below you can find a piece of code.
{{{
UnicodeDecodeError at /admin/articulos/articulo/add/
'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in
range(128)
Request Method: GET
Request URL: http://www..../admin/articulos/articulo/add/
Exception Type: UnicodeDecodeError
Exception Value: 'ascii' codec can't decode byte 0xc3 in position
8: ordinal not in range(128)
Exception Location: /home/rubenper/django/django/oldforms/__init__.py
in render, line 490
Template error
In template
/home/rubenper/django/django/contrib/admin/templates/widget/foreign.html,
error at line 2
Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3
in position 8: ordinal not in range(128)
1 {% load admin_modify adminmedia %}
2 {% output_all bound_field.form_fields %}
}}}
Comment (by mtredinnick):
Fixed formatting in description.
--
Ticket URL: <http://code.djangoproject.com/ticket/3924#comment:3>
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
-~----------~----~----~----~------~----~------~--~---