[Fixed]-Why when I go and view someones user profile (localhost/{{user}}/) it alters my base.html file?

1👍

The user from your view is clashing with the logged in user from the auth context processor. You can fix it by choosing a different variable name for the user in your view.

return render(request, template, {
    'other_user': user,
})

Then in your template

{{ other_user }}

0👍

Because you are showing the username using which account have logged in. So, it will keep showing logged in username unless you log out of that.

👤Pramod

Leave a comment