Django Rest Framework Series - Permissions and Custom Permissions - Part-2

  Рет қаралды 71,902

Very Academy

Very Academy

Күн бұрын

Пікірлер: 88
@anand_dudi
@anand_dudi 3 жыл бұрын
i have gone throught so many youtube tutorials,videos but never got understand in depth how rest is actually works and landed here now everything is crystal clear
@adahal39
@adahal39 3 жыл бұрын
A pure Gold content, A solid series in youtube not only in using the framework but understanding entire web development.
@veryacademy
@veryacademy 3 жыл бұрын
👍
@alpstinger5083
@alpstinger5083 3 жыл бұрын
This was so beautifully explained! Your voice is so soothing and reassuring. Thanks for posting!
@veryacademy
@veryacademy 3 жыл бұрын
You are so welcome!
@mateusjunior1937
@mateusjunior1937 3 жыл бұрын
so far , so good, rarely found a video tuto ,which explain the step by step like this , thx again ...
@veryacademy
@veryacademy 3 жыл бұрын
Glad it helped 👍
@tarassavchenko2317
@tarassavchenko2317 4 жыл бұрын
I will comment just so youtube improve it algorithm high-quality content here
@veryacademy
@veryacademy 4 жыл бұрын
Thank you! Love your approach to the algorithm - every little helps
@mostafarafid3593
@mostafarafid3593 3 жыл бұрын
Better than many paid django-rest courses....Keep it up...your channel is definitely gonna grow.
@veryacademy
@veryacademy 3 жыл бұрын
Thank you 👍
@mohammedezzi6096
@mohammedezzi6096 4 жыл бұрын
A beautiful series (all the series in the channel) with great content well presented and organized with a lot of effort, congratulations
@VskiDevs
@VskiDevs 2 жыл бұрын
agreed
@kaushik.aryan04
@kaushik.aryan04 2 жыл бұрын
YOU ARE AMAZING DUDE
@veryacademy
@veryacademy 2 жыл бұрын
Too kind
@felixfigueroa
@felixfigueroa 3 жыл бұрын
You are the best ..Zender.. ! Thank you so much..!
@veryacademy
@veryacademy 3 жыл бұрын
You're welcome!
@dennisasamoah2213
@dennisasamoah2213 2 жыл бұрын
great video as usual
@veryacademy
@veryacademy 2 жыл бұрын
🙏
@MrKeepItTrill
@MrKeepItTrill 3 жыл бұрын
Amazing tutorial, great to focus on writing tests right from the start, here's your comment for the algorithm :)
@shahlagaribi7968
@shahlagaribi7968 Жыл бұрын
you explain very clearly. thanks😍
@whichdude420
@whichdude420 4 жыл бұрын
Django Rest Framework tutorial marathon lets goooo
@veryacademy
@veryacademy 4 жыл бұрын
It really feels that way 😂 another big one tomorrow JWT Authentication front and back-end!
@KrishnaManohar8021
@KrishnaManohar8021 4 жыл бұрын
@@veryacademy Waiting...
@abdelhamidrobaa
@abdelhamidrobaa 9 ай бұрын
Amazing explanation , specially testing part!
@FreeDomSy-nk9ue
@FreeDomSy-nk9ue 2 жыл бұрын
Dope. That was really really helpful Wish me luck while I update my project to use DRF
@veryacademy
@veryacademy 2 жыл бұрын
Best of luck!
@otobongedoho9018
@otobongedoho9018 5 ай бұрын
This is really good stuff
@punch12341
@punch12341 4 жыл бұрын
Thank you so much. This is exactly what I needed, your lectures help me a lot especially the testing part
@docetes
@docetes 3 жыл бұрын
As usual.... top stuff!
@veryacademy
@veryacademy 3 жыл бұрын
Thanks again! 👍
@abhikb
@abhikb 4 жыл бұрын
very helpful video sir thanks for making this series
@veryacademy
@veryacademy 4 жыл бұрын
Most welcome
@elonmusk2142
@elonmusk2142 4 жыл бұрын
Thank you bruh . keep up dont loose your motivation god blesses you
@veryacademy
@veryacademy 4 жыл бұрын
👍
@TheBodybuildingG
@TheBodybuildingG 3 жыл бұрын
Nicely done , logical flow of information and examples.
@nicocouss7849
@nicocouss7849 3 жыл бұрын
Really nice serie, thx a lot!
@veryacademy
@veryacademy 3 жыл бұрын
You're very welcome!
@mahmudsajib8648
@mahmudsajib8648 4 жыл бұрын
Love you for your effort ❤
@veryacademy
@veryacademy 4 жыл бұрын
Thank you so much 😀
@Omar_Thinks
@Omar_Thinks 3 жыл бұрын
Wonderful video. Thank you! :)
@veryacademy
@veryacademy 3 жыл бұрын
Thank you too!
@samjoel4152
@samjoel4152 4 жыл бұрын
Awesome in-depth videos with theory good work👍👍pls keep this going...
@veryacademy
@veryacademy 4 жыл бұрын
Thanks, will do! 👍
@paborlouise319
@paborlouise319 4 жыл бұрын
Thanks Sir. Great work.
@veryacademy
@veryacademy 4 жыл бұрын
Thank you - any question or issues just let me know.
@radosawskabania1529
@radosawskabania1529 3 жыл бұрын
Great video!
@KatuninPavel
@KatuninPavel 3 жыл бұрын
What is the point of extending PostUserWritePermission in PostDetail class? Why should View class be extended from Permission? You already used composition by setting permission_classes Tuple.
@user-dh8dd3pe1i
@user-dh8dd3pe1i 4 жыл бұрын
Nice sir keep it up 👍💪💪💪
@veryacademy
@veryacademy 4 жыл бұрын
Thank you, I will 🐱‍🏍
@anshuldubey9193
@anshuldubey9193 4 жыл бұрын
Amazing content! I do have a question for you. How would you set the custom permissions if for example a User belongs to a company and there are several companies with several users and you want to only return the data belong to a specific company depending on the user that's logged in! Kind of like a dashboard shared between several companies. Would you request something like user.company (from the user model) and filter the query object? I apologize if my question doesn't make any sense. Thanks
@user___01
@user___01 3 жыл бұрын
this is also my problem @Anshul Dubey do you got an answer or solution to this?
@mohmedAhmed-jo3pe
@mohmedAhmed-jo3pe 2 жыл бұрын
@@user___01 up
@chukwuka-steveorefo1812
@chukwuka-steveorefo1812 Жыл бұрын
Hi Zander, I was wondering why do we extend the Custom class as well and pass it to the persmissions_classes array for the detail view?
@FreeDomSy-nk9ue
@FreeDomSy-nk9ue 2 жыл бұрын
Is it possible to do this with django templates? How would you pass the data to the templates (just like it's done with pure django) but using rest framework? I'm trying to get the advantage of object level permissions and also keeping the door open for a future use of react etc...
@veryacademy
@veryacademy 2 жыл бұрын
I think I covered some of your question not too long ago in a mini series. I have yet to get to permissions with the API. My wife keeps asking will I run out of content. I just smile, by the time I get around to everything just Django related, Django would have changed so much I would have to re-make all the tutorials again.
@FreeDomSy-nk9ue
@FreeDomSy-nk9ue 2 жыл бұрын
@@veryacademy That is so true. Don't forget plenty of available extensions. I don't know if you've already covered django-channels but it's really big and fun to make things with.
@user___01
@user___01 3 жыл бұрын
This series is so helpful but I do want to ask a question how do you implement an IsOwner custom permission if you have many-to-many field for like the author in this example. What I mean is that only the authors who has the permission to modify the post.
@mr.anderson5393
@mr.anderson5393 Жыл бұрын
Great video sir. I have a question. In order for custom permission to work in the views, do you need create 'Group' and set 'User Permission ' in the admin panel? For some reason custom permission does not work - the custom permission in Detail view do not give PUT, DELETE . only read-only.
@abdelrhmanahmed1378
@abdelrhmanahmed1378 3 жыл бұрын
when we create a post using the post view why it didnot saved in the temporary database ?!
@gaborlakatos882
@gaborlakatos882 3 жыл бұрын
My question is that how could you understand the documentation of this permission section on the webpage. I read through it and I got so confused.
@veryacademy
@veryacademy 3 жыл бұрын
I know how you feel, sometimes they are not very friendly. As you knowledge of code and Django develops you will understand it more so. 👍
@eagleofsharm
@eagleofsharm 3 жыл бұрын
Golden Inf, THANK YOU
@harshbiyani3048
@harshbiyani3048 11 ай бұрын
Why do we need to Inherit PostUSerWritePermission ? Will mentioning this class as permission_classes won't suffice ?
@veryacademy
@veryacademy 11 ай бұрын
While directly mentioning the class in permission_classes might work in some cases, using a custom permission class provides a more modular and maintainable approach, especially as your application grows in complexity.
@harshbiyani3048
@harshbiyani3048 11 ай бұрын
@@veryacademy can you please elaborate more, i dint get the part that it may work in some cases also inheritance is different than setting an attribute, hency why do we need to inherit when official document says to pass it as a value to permission_classes attribute
@rangabharath4253
@rangabharath4253 4 жыл бұрын
Awesome
@veryacademy
@veryacademy 4 жыл бұрын
Thank you 👍
@xVeraldi
@xVeraldi 2 жыл бұрын
is there a way to restrict someone from creating a Post as another user? looks like your user aaaa can create a post as admin
@veryacademy
@veryacademy 2 жыл бұрын
Hi Rafael, indeed we can. Take a look at creating some permissions. Won’t be too long now I will be creating a series of tutorials on the topic. It is one of the most requested topics.
@suavementelucas7351
@suavementelucas7351 2 жыл бұрын
and if I want to list only the posts of the logged in user?
@veryacademy
@veryacademy 2 жыл бұрын
You need to create a query for example - Post.object.filter(user=1)
@abdelrhmanahmed1378
@abdelrhmanahmed1378 3 жыл бұрын
how can we store the author name also in the post model ,so we can retrieve it when we serialize
@diegobraga2207
@diegobraga2207 4 жыл бұрын
your tutorials are the best!! could you make an tutorial how to make I like button in both sides django and react?
@jeraldjoshuaechavia1108
@jeraldjoshuaechavia1108 3 жыл бұрын
On testing the permission I got an error when test posting the author with errors "{'author': [ErrorDetail(string='Invalid pk "1" - object does not exist.', code='does_not_exist')]}" Is this because the model is a foreign key? Is there any solutions that could help me, btw i'm using MySQL and Axios not Fetch and sqlite3
@veryacademy
@veryacademy 3 жыл бұрын
Sounds like there is no data in the database or you are selecting the wrong data in the database?
@igormundim
@igormundim 2 жыл бұрын
Aula muito boa!
@aashayamballi
@aashayamballi 4 жыл бұрын
Thank you 🙏🏼🙏🏼
@veryacademy
@veryacademy 4 жыл бұрын
You are so welcome 👍
@usamashehab9319
@usamashehab9319 2 жыл бұрын
Sir i noticed two problems First one is with prepopulated slug ,when i use django admin dashboard to create post slug prepopulated correctly but when use rest api to create post the slug field doesn’t prepopulated, it’s empty field The second problem is with DjangoModelPermissions i gave user only add permission and it works fine with django admin dashboard and i just can add and can’t read ,but in rest api the user can read ,add, delete I hope you sir answer me or give me resources to understand the reasons of these problems
@veryacademy
@veryacademy 2 жыл бұрын
Really sorry it is difficult to help you in a meaningful way. I have noted the issues and will use it to deliver further content.
@quizandfun_
@quizandfun_ Жыл бұрын
I wanted to get your courses through Udemy Business, but out of 9 only 2 of your courses were available. Can you make all of your courses available in Udemy Business?
@veryacademy
@veryacademy Жыл бұрын
Do me a favor and ask/beg Udemy customer services, I have no control over it.
@Pavel-er4hy
@Pavel-er4hy 2 жыл бұрын
Hello! I express my gratitude for the lessons. I have a question : when i make test i get: return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named 'rest_framework' Who got result of test like my? And find good soluiton...
@paycation3966
@paycation3966 11 ай бұрын
15:57 forgot the password, hahaha
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Creating a Django Custom Router
38:29
Very Academy
Рет қаралды 1,8 М.
Docker HealthCheck Instruction
13:41
Very Academy
Рет қаралды 630
Migrating a Django Model to a Test Database
23:25
Very Academy
Рет қаралды 445
Django | PostgreSQL Trigger
9:51
Very Academy
Рет қаралды 417
Django Custom Migration | Introducing Pytest Fixtures
8:11
Very Academy
Рет қаралды 307
Test Case  1: Check Category Table Exists
20:41
Very Academy
Рет қаралды 515
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН