From d780e12a8015a47faeddc27c0189f56ce4ad2c3c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Sep 2010 14:57:29 +0200 Subject: [PATCH] stripAccents --- oxdata/lookup/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oxdata/lookup/models.py b/oxdata/lookup/models.py index 9dbb54a..08ce76b 100644 --- a/oxdata/lookup/models.py +++ b/oxdata/lookup/models.py @@ -8,7 +8,7 @@ from django.db.models import Q, Max from django.contrib.auth.models import User import ox -from ox.normalize import canonicalName, normalizePath +from ox.normalize import canonicalName, normalizePath, stripAccents from ox import stripTags import ox.web.imdb import ox.web.wikipedia @@ -121,7 +121,8 @@ class MovieId(models.Model): title = self.title if self.year: title += ' (%s)' % self.year - return os.path.join(directors[0].upper(), normalizePath(directors), normalizePath(title)) + folder = stripAccents(directors[0].upper())[0] + return os.path.join(folder, normalizePath(directors), normalizePath(title)) def json(self): json = {}