I write a simple django condition but it not working
{% if request.user == "sami" %} sami {% else %} khan {% endif %}
Requset.user is an object. You need to write {% if request.user.username == "sami" %} or {% if request.user.name == "sami" %} whatever is in your model
{% if request.user.username == "sami" %}
{% if request.user.name == "sami" %}
1.4m articles
1.4m replys
5 comments
56.9k users