Hi folks, I have the following code:
_CHOICES_FORMATION = (
'Administração',
'Design Gráfico',
'Jornalismo',
'Marketing',
'Outras',
)
class Contact(db.Model):
name = db.StringProperty(verbose_name='Nome', required=True)
email = db.EmailProperty(verbose_name='E-mail', required=True)
phone = db.StringProperty(verbose_name='Telefone')
formation = db.StringProperty(
verbose_name=u'Formação',
choices=_CHOICES_FORMATION,
default=_CHOICES_FORMATION[0])
When I try to run it, I got
File "/home/josir/sist/google_appengine/google/appengine/ext/db/
djangoforms.py", line 170, in get_form_field
choices.append((str(choice), unicode(choice)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
10: ordinal not in range(128)
To fix it, I tried:
1) u'Administração',
2) insert the header:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# coding=utf-8
But both solution didn't work. How can I use latin (portuguese)
characters on choice field ?
Thanks in advance,
Josir.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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/google-appengine?hl=en.