Skip to content
Advertisement

Django: how to check a guest or a page owner entered the page

I am doing a social network, I have one profile template for all users, how to check a guest or a page owner entered the page, {% if profile.user.username == None%} tried to write like this in html but it works strangely.For users, I use the Profile model

JavaScript

Advertisement

Answer

try this

JavaScript

https://docs.djangoproject.com/en/3.1/topics/templates/

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement