3👍
✅
If you have access to your ‘settings.py’ file, then you can change the settings saying that your database is using ‘latin1’.
Following is the example of the ‘DATABASES’ configuration in ‘settings.py’ file.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test_db',
'USER': 'root',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
'OPTIONS': {
'charset': 'latin1',
'use_unicode': True, },
},
}
I had similar issue earlier, checkout the link here Django database charset issue
- [Django]-Is using the "escape" tag really mandatory as a good security pattern in Django?
- [Django]-Unicode-objects must be encoded before hashing
- [Django]-Django ModelForm CheckBox Widget
- [Django]-Django messages framework with built-in Jinja2 backend
Source:stackexchange.com