Commit b1ead9be99e340ac8eb181c3de4740f629f4c34e
1 parent
f28b506f
Exists in
master
and in
39 other branches
Adding get_absolute_url method to thread
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/super_archives/models.py
| ... | ... | @@ -108,6 +108,10 @@ class Thread(models.Model): |
| 108 | 108 | verbose_name_plural = _(u"Threads") |
| 109 | 109 | unique_together = ('subject_token', 'mailinglist') |
| 110 | 110 | |
| 111 | + @models.permalink | |
| 112 | + def get_absolute_url(self): | |
| 113 | + return ('thread_view', [self.mailinglist, self.subject_token]) | |
| 114 | + | |
| 111 | 115 | def __unicode__(self): |
| 112 | 116 | return '%s - %s (%s)' % (self.id, |
| 113 | 117 | self.subject_token, | ... | ... |