##// END OF EJS Templates
Added ordering to replies.
neko259 -
r215:fd98bd81 default
parent child Browse files
Show More
@@ -110,7 +110,7 b' class PostManager(models.Manager):'
110 110
111 111 if opening_post.replies:
112 112 thread = [opening_post]
113 thread.extend(opening_post.replies.all())
113 thread.extend(opening_post.replies.all().order_by('pub_time'))
114 114
115 115 return thread
116 116
@@ -269,7 +269,7 b' class Post(models.Model):'
269 269 if reply_count > 0:
270 270 reply_count_to_show = min(settings.LAST_REPLIES_COUNT,
271 271 reply_count)
272 last_replies = self.replies.all()[reply_count -
272 last_replies = self.replies.all().order_by('pub_time')[reply_count -
273 273 reply_count_to_show:]
274 274
275 275 return last_replies
General Comments 0
You need to be logged in to leave comments. Login now