Skip to content

Commit

Permalink
Check_2
Browse files Browse the repository at this point in the history
  • Loading branch information
smaspb17 committed Mar 18, 2023
1 parent 052feb9 commit 1c47292
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yatube/posts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def profile(request, username):
posts = author.posts.all()
page_obj = paginator(request, posts)
post_count = author.posts.select_related('group', 'author').count()
follower_count = Follow.objects.filter(user=user).count()
follower_count = Follow.objects.filter(user=author).count()
following = (
user.is_authenticated
and Follow.objects.filter(user=user, author=author)
Expand Down
2 changes: 1 addition & 1 deletion yatube/templates/posts/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="mb-5">
<h1>Все посты пользователя {{ username }} </h1>
<h3>Всего постов: {{ post_count }} </h3>
<h3>Всего подписчиков: {{ follower_count }} </h3>
<h3>Всего подписок: {{ follower_count }} </h3>
{% if following %}
<a
class="btn btn-lg btn-light"
Expand Down

0 comments on commit 1c47292

Please sign in to comment.