5👍
✅
you should check if your database has utf8 charset on table in which you are trying to insert.
for mysql
show create table TableName;
to change encoding
alter table TableName DEFAULT CHARACTER SET utf8;
1👍
What database are you using? If it’s MySQL, make sure you follow the Django documentation on creating UTF-8 compatible MySQL databases.
- [Django]-Django – overiding get_fieldset in ModelAdmin returns a field twice
- [Django]-Ingress and Ingress controller how to use them with NodePort Services?
- [Django]-Defining django queryset with Q objects with foreign key
0👍
Use unicode(‘some string’) in order to send the string to DB in Unicode. You might have different settings for the DB, but this is not connected with Django.
- [Django]-Django: only blank page
- [Django]-Why are my django model fields not working?
- [Django]-Logout message using django-allauth and redirect to home page
- [Django]-How to fetch last 24 hours records from database
Source:stackexchange.com