Commit fc66f4ba authored by Michal Čihař's avatar Michal Čihař

Way to get related suggestions

parent adcedca8
......@@ -414,6 +414,9 @@ class Unit(models.Model):
ret.append('<a href="%s">%s</a>' % (link, location))
return mark_safe('\n'.join(ret))
def suggestions(self):
return Suggestion.objects.filter(checksum = self.checksum)
class Suggestion(models.Model):
checksum = models.CharField(max_length = 40, default = '', blank = True, db_index = True)
target = models.TextField()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment