Answer the question
In order to leave comments, you need to log in
Django. How to change encoding from ascii to utf-8?
Python 3.5
Django 1.10
Making a POST request:
Trying to display the received value:
Getting an error:description = request.POST.get('description', '')
print(description)
'ascii' codec can't encode characters in position 93-98: ordinal not in range(128)
DEFAULT_CHARSET = 'utf-8'
Answer the question
In order to leave comments, you need to log in
class Blog (models.Model):
title = models.CharField(max_length=100, verbose_name="Все категории")
def __str__(self):
return self.title
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question