Commits

Anonymous committed cd348a7

add restrict to views

  • Participants
  • Parent commits 25f0a84

Comments (0)

Files changed (1)

newsmeme/views/user.py

                                     page=page)
 
     num_posts = Post.query.filter_by(author_id=user.id).count()
+    num_comments = Comment.query.filter_by(author_id=user.id).count()
 
     return render_template("user/comments.html",
                            user=user,
                            num_posts=num_posts,
-                           num_comments=page_obj.total,
+                           num_comments=num_comments,
                            page_obj=page_obj,
                            page_url=page_url)