Re: Request method mapping is happening after permission check.

2019-10-24 Thread DIPENDRA BHATT
Ok, yeah i checked that now. But now another issue is, if i try to send any request other than post to create_user, why is the action variable set as none. But if i send the authentication headers that time the action variables is properly set. On Thursday, October 24, 2019 at 7:56:34 PM

Re: Request method mapping is happening after permission check.

2019-10-24 Thread Jason
Good question! the answer lies in dispatch , try: self.initial(request, *args, **kwargs) # Get the appropriate handler method if request.method.lower()

Request method mapping is happening after permission check.

2019-10-23 Thread DIPENDRA BHATT
So, this issue is something that i faced while testing of my class based views. I had a view that creates and updates user as shown below. class UserViewSet(ViewSet): def check_permissions(self, request): print("Action = ", self.action) if self.action == 'create_user':