Hello , Welcome to my chat site ! {{request.user}}


{% if request.user.is_authenticated %}
Logout the chat Page Logout
{% endif %}



### The URL is in Django format, this is Django syntax to map to a URL. We will create a URL named “logout-user”, then Django will map this URL name to the URL from the template. Django provides a few pythonic syntaxes to deal with the control statement. Here we have provided {% if request.user.is_authenticated %} line in the HTML, this is given by Django which ensures that if there is any user who is logged in, then only displays the logout link.