Questions


Related Questions:


Questions

Asked By :  Marissa Warren
Answers1

What django mixin class did we add to our views that allowed

What Django mixin class did we add to our Views that allowed us to restrict updating and deleting articles to the article's author?
UserPassesTestMixin
TestUserMixin
CheckUserMixin
TestFuncMixin



Answers :

0

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

Paula Marshall

Your Answer



XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Write your answer, be as detailed as possible...

Reply as a guest

Required but never shown

Try Now AI powered Content Automation