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 @@ -7,7 +7,6 @@ from boards.models import PostImage, Att from boards.models.base import Viewable from boards.models.post.export import get_exporter, DIFF_TYPE_JSON from boards.models.post.manager import PostManager -from boards.utils import cached_result from boards.utils import datetime_to_epoch from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse @@ -176,10 +175,6 @@ class Post(models.Model, Viewable): def _get_cache_key(self): return [datetime_to_epoch(self.last_edit_time)] - @cached_result(key_method=_get_cache_key) - def get_thread_count(self): - return self.get_threads().count() - def get_view(self, *args, **kwargs) -> str: """ Renders post's HTML view. Some of the post params can be passed over @@ -353,17 +348,6 @@ class Post(models.Model, Viewable): return text - def get_absolute_id(self) -> str: - """ - If the post has many threads, shows its main thread OP id in the post - ID. - """ - - if self.get_thread_count() > 1: - return '{}/{}'.format(self.get_thread().get_opening_post_id(), self.id) - else: - return str(self.id) - def connect_threads(self, opening_posts): for opening_post in opening_posts: threads = opening_post.get_threads().all() 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 @@