Wednesday, February 16, 2011

unicode options in models...

Hi, total noob here.
This is probably me being extremelly stupid at some point, and I
haven't found an answer to this question however i phrased it even tho
it's probably in the documentation somewhere but I just don't
understand it

So I'm writing a django site in spanish and the spanish non-ascii
characters such as accents and Ñ work fine everywhere except in model
options such as verbose_name or help_text. They don't work in field
names either but i can live with that.

so if write
class Test(models.Model):
test = models.CharField(max_length=100, help_text="dádá español")

When i try to syncdb i get this error

SyntaxError: Non-ASCII character '\xc3' in file /Users/Sala4/Documents/
BLUR_WEB/DJANGO/blurweb/../blurweb/website/models.py on line 49, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for
details

I read the site above but didnt understand a thing sorry...I thought
django used utf-8 all over the place and everything should be easy and
rosy as long as the database is in utf-8 too (it is), where am I
wrong?
thanks a lot

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate