If user successfully login i need to show one template. if user not login i need to show another template.
I created two templates one is base.html
another one is base_login.html
template.
IF user successfully login i need to call base_login.html
other wise base.html
. i am using below to achieve this. it's not giving expected result. How do achieve this?
{% if user.is_authenticated %}
<p>Welcome {{ user.username }} !!!</p>
{% extends "base_login.html" %}
{% else %}
{% extends "base.html" %}
{% endif %}