Show More
@@ -56,9 +56,13 b' class Tag(models.Model, Viewable):' | |||
|
56 | 56 | def get_thread_count(self) -> int: |
|
57 | 57 | return self.get_threads().count() |
|
58 | 58 | |
|
59 | # TODO Remove this and use get_absolute_url | |
|
59 | 60 | def get_url(self): |
|
60 | 61 | return reverse('tag', kwargs={'tag_name': self.name}) |
|
61 | 62 | |
|
63 | def get_absolute_url(self): | |
|
64 | return self.get_url() | |
|
65 | ||
|
62 | 66 | def get_threads(self): |
|
63 | 67 | return self.thread_set.order_by('-bump_time') |
|
64 | 68 | |
@@ -67,7 +71,7 b' class Tag(models.Model, Viewable):' | |||
|
67 | 71 | |
|
68 | 72 | def get_view(self): |
|
69 | 73 | link = '<a class="tag" href="{}">{}</a>'.format( |
|
70 | self.get_url(), self.name) | |
|
74 | self.get_absolute_url(), self.name) | |
|
71 | 75 | if self.is_required(): |
|
72 | 76 | link = '<b>{}</b>'.format(link) |
|
73 | 77 | return link |
General Comments 0
You need to be logged in to leave comments.
Login now