Is checking ownership with UserPassesTestMixin considered an antipattern?

I’ve found this website describing this use case as an antipattern, but also found it being at least ok in this forum post.
Is there a general consensus?

Regarding the “anti-patterns” site - I’d say the author is overstating the potential effects of doing it.

First, in general use, both Django and the database engine do a lot of cacheing of queries and query results. Even if the two queries are both issued to the database, it’s almost certain that the second instance is going to be pulled from the database cache. Running some test cases on a couple of production servers shows that the second instance of the query returns in about 1 ms.

You would find it difficult to convince me that this additional overhead is at all significant.

And if your system is so heavily loaded that this becomes a real (as opposed to a conjectured or hypothisized) issue, you can improve things by doing your own caching of results within the view.

Yes, there are some sites where such performance considerations are real. However, I suspect that the number is a lot smaller than you may think - and you’re not going to encounter these types of issues on Day 1, if you ever do.

Take advantage of work already done for you. Get your system up and running. Then, if you start seeing performance issues, you can evaluate everything to see where the problems actually reside. That approach is a whole lot more time efficient than trying to solve problems that may occur.