Logic is not rendered correctly

Except 9 seconds after it requests /posts/bill, it requests /posts.

Try this - instead of having anything being done through the JavaScript, open up another tab and enter the URL /posts/bill and report what you get. Don’t go through any of your other pages or any of the JavaScript. That will help isolate the issue between the two.

That I clicked on ‘All posts’. Thats why it is showing all posts. Anyway, there is no differnce between ‘filtered’ post and ‘all posts’ as both are same due some fail in code.

This worked.

URL /posts/bill

It did show ‘filtered’ posts in new tab.

Ok, so since you know that the URL ‘/posts/bill’ works correctly, it’s something in your JavaScript with handling the response that isn’t working. This is not a problem with the view or your template.
Either your JavaScript isn’t sending the right request, or it’s not doing what it’s supposed to do with the response, or what - but this isn’t a Django issue.

Thanks for the help. I appreciate it very much.