##// END OF EJS Templates
Style cleanup
neko259 -
r608:1731e23d default
parent child Browse files
Show More
@@ -169,10 +169,10 b' class PostManager(models.Manager):'
169 169 day_end = today - timedelta(i + 1)
170 170 day_start = today - timedelta(i + 2)
171 171
172 day_time_start = timezone.make_aware(datetime.combine(day_start,
173 dtime()), timezone.get_current_timezone())
174 day_time_end = timezone.make_aware(datetime.combine(day_end,
175 dtime()), timezone.get_current_timezone())
172 day_time_start = timezone.make_aware(datetime.combine(
173 day_start, dtime()), timezone.get_current_timezone())
174 day_time_end = timezone.make_aware(datetime.combine(
175 day_end, dtime()), timezone.get_current_timezone())
176 176
177 177 posts_per_days.append(float(self.filter(
178 178 pub_time__lte=day_time_end,
@@ -302,9 +302,8 b' class Post(models.Model):'
302 302 if not link:
303 303 opening_post = self.thread_new.get_opening_post()
304 304 if self != opening_post:
305 link = reverse('thread',
306 kwargs={'post_id': opening_post.id}) + '#' + str(
307 self.id)
305 link = reverse('thread', kwargs={
306 'post_id': opening_post.id}) + '#' + str(self.id)
308 307 else:
309 308 link = reverse('thread', kwargs={'post_id': self.id})
310 309
@@ -379,8 +378,8 b' class Thread(models.Model):'
379 378 if reply_count > 0:
380 379 reply_count_to_show = min(settings.LAST_REPLIES_COUNT,
381 380 reply_count - 1)
382 last_replies = self.replies.all().order_by('pub_time')[
383 reply_count - reply_count_to_show:]
381 last_replies = self.replies.all().order_by(
382 'pub_time')[reply_count - reply_count_to_show:]
384 383
385 384 return last_replies
386 385
General Comments 0
You need to be logged in to leave comments. Login now