Вопрос

My Django tests are failing with this error.

DatabaseError: character 0xcb88 of encoding "UTF8" has no equivalent in "LATIN1"

It's because the encoding on the database needs to be UTF8. However this is the test database created automatically by Django.

How can I tell it to create it with the correct encoding?

Thanks

Это было полезно?

Решение

You can define charset for test database in your settings.py file: https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-TEST_CHARSET

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top