[Answered ]-How to display the post user created with {% if user.is_authenticated == post.author %}?

2👍

{% if user.is_authenticated == category.author %}

is not a valid check. user.is_authenticated returns a boolean (True/False), and category.author is a user object. You are checking for equality incorrectly.

Try this instead:

{% if user.is_authenticated and user == category.author %}

since category.author is a User instance

Leave a comment