Reputation: 13763
There is this model:
class Currency(CustomBaseModel):
name = models.CharField(_('name'), max_length=10)
There are two items in the database:
1. сум
2. у.e
These are russian characters. I am doing a simple filter:
Currency.objects.filter(name="сум")
It returns an empty list. I think the problem with encoding.
How to do this?
Upvotes: 0
Views: 61
Reputation: 1
try put this line at the top of your source code:
# -*- coding: utf-8 -*-
Upvotes: 0
Reputation: 11808
Django works with unicode. Try Currency.objects.filter(name=u"сум")
Upvotes: 1