diff --git a/boards/models.py b/boards/models.py --- a/boards/models.py +++ b/boards/models.py @@ -110,7 +110,7 @@ class PostManager(models.Manager): if opening_post.replies: thread = [opening_post] - thread.extend(opening_post.replies.all()) + thread.extend(opening_post.replies.all().order_by('pub_time')) return thread @@ -269,7 +269,7 @@ class Post(models.Model): if reply_count > 0: reply_count_to_show = min(settings.LAST_REPLIES_COUNT, reply_count) - last_replies = self.replies.all()[reply_count - + last_replies = self.replies.all().order_by('pub_time')[reply_count - reply_count_to_show:] return last_replies