name/foo should work too

This commit is contained in:
j 2011-10-30 15:01:38 +01:00
parent 0253cda7e1
commit e92f0a4d56
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ class Event(models.Model):
name = name.lower() name = name.lower()
if name in value and (value.startswith(name) or \ if name in value and (value.startswith(name) or \
value.endswith(name) or \ value.endswith(name) or \
re.compile('\s%s[\.,;:!?\-\s]'%name).findall(value)): re.compile('\s%s[\.,;:!?\-\/\s]'%name).findall(value)):
matches.append(a.id) matches.append(a.id)
break break
if not matches: if not matches:

View file

@ -87,7 +87,7 @@ class Place(models.Model):
for name in [self.name] + list(self.alternativeNames): for name in [self.name] + list(self.alternativeNames):
if name in value and (value.startswith(name) or \ if name in value and (value.startswith(name) or \
value.endswith(name) or \ value.endswith(name) or \
re.compile('\s%s[\.,;:!?\-\s]'%name).findall(value)): re.compile('\s%s[\.,;:!?\-\/\s]'%name).findall(value)):
matches.append(a.id) matches.append(a.id)
break break
if not matches: if not matches: