diff --git a/boards/mdx_neboard.py b/boards/mdx_neboard.py --- a/boards/mdx_neboard.py +++ b/boards/mdx_neboard.py @@ -130,7 +130,7 @@ def render_reflink(tag_name, value, opti try: post = boards.models.Post.objects.get(id=post_id) - result = '>>%s' % (post.get_url(), post_id) + result = '>>%s' % (post.get_absolute_url(), post_id) except ObjectDoesNotExist: pass diff --git a/boards/models/post/__init__.py b/boards/models/post/__init__.py --- a/boards/models/post/__init__.py +++ b/boards/models/post/__init__.py @@ -199,7 +199,7 @@ class Post(models.Model, Viewable): the server from recalculating the map on every post show. """ - post_urls = [REFMAP_STR.format(refpost.get_url(), refpost.id) + post_urls = [REFMAP_STR.format(refpost.get_absolute_url(), refpost.id) for refpost in self.referenced_posts.all()] self.refmap = ', '.join(post_urls) @@ -214,10 +214,6 @@ class Post(models.Model, Viewable): return self.get_thread().get_opening_post_id() == self.id - # TODO Remove this and use get_absolute_url method - def get_url(self): - return self.url - def get_absolute_url(self): return self.url diff --git a/boards/models/tag.py b/boards/models/tag.py --- a/boards/models/tag.py +++ b/boards/models/tag.py @@ -56,13 +56,9 @@ class Tag(models.Model, Viewable): def get_thread_count(self) -> int: return self.get_threads().count() - # TODO Remove this and use get_absolute_url - def get_url(self): + def get_absolute_url(self): return reverse('tag', kwargs={'tag_name': self.name}) - def get_absolute_url(self): - return self.get_url() - def get_threads(self): return self.thread_set.order_by('-bump_time') diff --git a/boards/templates/boards/post.html b/boards/templates/boards/post.html --- a/boards/templates/boards/post.html +++ b/boards/templates/boards/post.html @@ -5,7 +5,7 @@