normalize

This commit is contained in:
j 2011-10-11 20:18:56 +02:00
parent bfb7bd88ba
commit b321656bff
3 changed files with 3 additions and 1 deletions

2
README
View File

@ -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:

View File

@ -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

View File

@ -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