find matches accros newlines

This commit is contained in:
j 2012-03-09 23:37:54 +01:00
commit 4f16b59458
2 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import json
import ox
from django.conf import settings
from celery.task import task
@ -24,8 +25,9 @@ def update_matching_events(id):
names = {}
for n in Event.objects.all().values('id', 'name', 'alternativeNames'):
names[n['id']] = [n['name']] + json.loads(n['alternativeNames'])
value = a.value.lower()
names[n['id']] = [ox.decodeHtml(n) for n in [n['name']] + json.loads(n['alternativeNames'])]
value = a.findvalue.lower()
update = []
for i in names:
for name in names[i]: