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" %}
2.1m questions
2.1m answers
60 comments
57.0k users