diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -169,10 +169,10 @@ class PostManager(models.Manager): day_end = today - timedelta(i + 1) day_start = today - timedelta(i + 2) - day_time_start = timezone.make_aware(datetime.combine(day_start, - dtime()), timezone.get_current_timezone()) - day_time_end = timezone.make_aware(datetime.combine(day_end, - dtime()), timezone.get_current_timezone()) + day_time_start = timezone.make_aware(datetime.combine( + day_start, dtime()), timezone.get_current_timezone()) + day_time_end = timezone.make_aware(datetime.combine( + day_end, dtime()), timezone.get_current_timezone()) posts_per_days.append(float(self.filter( pub_time__lte=day_time_end, @@ -302,9 +302,8 @@ class Post(models.Model): if not link: opening_post = self.thread_new.get_opening_post() if self != opening_post: - link = reverse('thread', - kwargs={'post_id': opening_post.id}) + '#' + str( - self.id) + link = reverse('thread', kwargs={ + 'post_id': opening_post.id}) + '#' + str(self.id) else: link = reverse('thread', kwargs={'post_id': self.id}) @@ -379,8 +378,8 @@ class Thread(models.Model): if reply_count > 0: reply_count_to_show = min(settings.LAST_REPLIES_COUNT, reply_count - 1) - last_replies = self.replies.all().order_by('pub_time')[ - reply_count - reply_count_to_show:] + last_replies = self.replies.all().order_by( + 'pub_time')[reply_count - reply_count_to_show:] return last_replies