From b321656bff10d09c5e3b2063be1ae068dab52a89 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 11 Oct 2011 20:18:56 +0200 Subject: [PATCH] normalize --- README | 2 +- pandora/person/models.py | 1 + pandora/title/models.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README b/README index e2e9576a..02505dec 100644 --- a/README +++ b/README @@ -33,7 +33,7 @@ you need python, bazaar, pip and virtualenv and several other python modules: and run ./manage.py syncdb to populate the database you might want to load example configurations from fixutes. - createdb --locale=C --encoding=UTF8 pandora + createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora * RabbitMQ For background tasks we use RabbitMQ, to install rabbitmq: diff --git a/pandora/person/models.py b/pandora/person/models.py index 1384e74d..f34c2278 100644 --- a/pandora/person/models.py +++ b/pandora/person/models.py @@ -15,6 +15,7 @@ import managers def get_name_sort(name): + name = unicodedata.normalize('NFKD', name) person, created = Person.objects.get_or_create(name=name) sortname = unicodedata.normalize('NFKD', person.sortname) return sortname diff --git a/pandora/title/models.py b/pandora/title/models.py index c3b36aca..8e863b19 100644 --- a/pandora/title/models.py +++ b/pandora/title/models.py @@ -13,6 +13,7 @@ from item import utils import managers def get_title_sort(title): + title = unicodedata.normalize('NFKD', title) title, created = Title.objects.get_or_create(title=title) sorttitle = unicodedata.normalize('NFKD', title.sorttitle) return sorttitle