[Fixed]-Django user homepage: typing any characters into URL displays the currently logged in user's homepage?

1👍

Because you’re ignoring the username passed in the URL – you commented out the line where it uses it in the query – and you’re getting it directly from request.user instead.

Note that this is the correct thing to do, because you don’t want people accessing other users’ home pages; so you should remove the username from the URL.

Leave a comment