Hi, could you post the full traceback? And if some part of this traceback refers
to your code, it would be a good idea to also show us that part of your code.
On 29/04/2022 03.01, Thiago Luiz Parolin wrote:
Hi,
i have a model with 2 charfields for givenname, surname:
nome = models.CharField(
max_length=150,
verbose_name=_("Nome"),
default=''
)
sobrenome = models.CharField(
max_length=150,
verbose_name=_("Sobrenome"),
default=''
)
My modelForm does nothing, just defines a model at Meta with all fields.
My CreateView is just defined with all default values, not overriding anything.
When submitting the form, the server returns 500 if 'nome' or 'sobrenome'
fields have accent letters like Á, é, í, ç. etc.
The error:
'ascii' codec can't encode character '\xe9' in position 4: ordinal not in
range(128)
with character depending on user input.
I am using sqlite for db and the pragma encoding returns utf8.
I don't know how to deal with it.
Any help would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CANbmKyvUWshdM3ENz9LjbG66rLkt4vruM6cC9M-%3DKmL7rcCR%2Bg%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CANbmKyvUWshdM3ENz9LjbG66rLkt4vruM6cC9M-%3DKmL7rcCR%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/eafa7d28-9a14-7216-d5a9-46d230cc1530%40antonischristofides.com.