silly bug in autocomplete fixed

This commit is contained in:
Sanj 2012-07-31 01:04:30 +05:30
parent c4616f1ad9
commit 6cd0b65fe8
2 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class ItfModel(models.Model):
d = self.list_dict()
d['text'] = self.get_text()
if not d['text']:
return ''
d['text'] = ''
if len(d['text']) > 150:
d['text'] = d['text'][:150] + "..."
return d

View File

@ -291,6 +291,9 @@ class TheatreGroup(ItfModel):
'about': self.about,
}
def get_title(self):
return self.__unicode__()
class PersonGroup(models.Model):
person = models.ForeignKey(Person, db_index=True)
group = models.ForeignKey(TheatreGroup, db_index=True)