Comments on: Django REST Framework (DRF) CheatSheet https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/ Blog related to programming Sun, 17 Nov 2024 12:47:43 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: tlover tonet https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-237 Sun, 17 Nov 2024 12:47:43 +0000 https://www.mrcoder701.com/?p=1102#comment-237 I think other website proprietors should take this web site as an model, very clean and great user friendly style and design, let alone the content. You are an expert in this topic!

]]>
By: JSON validator online https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-155 Mon, 11 Nov 2024 16:13:30 +0000 https://www.mrcoder701.com/?p=1102#comment-155 Hi there, the whole thing is going fine here and ofcourse every one is sharing
facts, that’s truly good, keep up writing.

]]>
By: mr.coder https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-152 Mon, 11 Nov 2024 05:03:16 +0000 https://www.mrcoder701.com/?p=1102#comment-152 In reply to JSON validator online.

Thank you so much, and welcome aboard! I’m glad you enjoyed the points. As for recent posts, let me know if there’s anything specific you’re curious about, and I’d be happy to dive deeper or share extra insights!

]]>
By: JSON validator online https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-149 Sat, 09 Nov 2024 22:34:11 +0000 https://www.mrcoder701.com/?p=1102#comment-149 great points altogether, you just gained a logo new reader.
What would you suggest about your submit that you made a few days in the past?
Any certain?

]]>
By: JSON validator online https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-147 Wed, 06 Nov 2024 21:39:50 +0000 https://www.mrcoder701.com/?p=1102#comment-147 I was more than happy to discover this website.

I need to to thank you for your time for this particularly wonderful read!!
I definitely really liked every part of it and i also have you saved as
a favorite to see new information in your site.

my web blog: JSON validator online

]]>
By: JSON validator online https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-146 Wed, 06 Nov 2024 13:05:35 +0000 https://www.mrcoder701.com/?p=1102#comment-146 Thanks for sharing such a pleasant idea, post is nice, thats why i have
read it entirely

Visit my page :: JSON validator online

]]>
By: Tom https://www.mrcoder701.com/2024/10/18/django-rest-framework-cheat-sheet/#comment-131 Fri, 18 Oct 2024 14:28:57 +0000 https://www.mrcoder701.com/?p=1102#comment-131 Related to authentication and permissions. I have used something similar to this in my viewsets which allow you to use Django default object permissions similar to how the Django admin uses them (it is only really adding the get permissions but is an easy way to restrict an API) Than you can use the default Django permissions with groups to easily control who can use the different endpoint actions this also includes custom viewset actions.

from rest_framework import permissions
from rest_framework.authentication import BasicAuthentication
from rest_framework.permissions import IsAuthenticated

class MyPermissions(permissions.DjangoModelPermissions):
perms_map = {
“GET”: [“%(app_label)s.view_%(model_name)s”],
“OPTIONS”: [],
“HEAD”: [],
“POST”: [“%(app_label)s.add_%(model_name)s”],
“PUT”: [“%(app_label)s.change_%(model_name)s”],
“PATCH”: [“%(app_label)s.change_%(model_name)s”],
“DELETE”: [“%(app_label)s.delete_%(model_name)s”],
}

class MyView(APIView):
authentication_classes = [BasicAuthentication]
permission_classes = [IsAuthenticated | MyPermissions]

]]>