In Django, the UserPassesTestMixin
is commonly used to restrict updating and deleting actions to specific users, such as the author of an article. This mixin allows you to define a test condition that the current user must pass to access the view. Therefore, the appropriate mixin class is UserPassesTestMixin
.
Answered By