How to Use Django REST Framework Permissions

  Рет қаралды 40,845

Pretty Printed

Pretty Printed

Күн бұрын

Пікірлер: 70
@prettyprinted
@prettyprinted 4 жыл бұрын
Join my free course on building a Todo API with Django REST Framework: prettyprinted.com/djangotodoapi
@islamimankhodzhaev543
@islamimankhodzhaev543 3 жыл бұрын
Wow, you are golden spring for django learners.
@rajat1548
@rajat1548 4 жыл бұрын
Thank you so much sir, you are insane in teaching and making things really simplified.
@nareshk7481
@nareshk7481 4 жыл бұрын
No words to say about Explanation. Really Great video, thanks for proving this much valuable videos for us.
@bpospanov
@bpospanov 5 жыл бұрын
GOD. You are a freaking genius. Respect from Kazakhstan
@anthonysilva4406
@anthonysilva4406 4 жыл бұрын
You are the man. Thanks for the video, really helpful
@TeppopucT
@TeppopucT 6 жыл бұрын
I love You! My English is not very good, but your order of telling about any technology is excellent! I understand all of your videos. Thx very much! Good luck!
@prettyprinted
@prettyprinted 6 жыл бұрын
You're welcome! Thanks for watching.
@kadrogo601
@kadrogo601 5 жыл бұрын
You are my GOD!! thank you for your amazing lectures!
@ajborbzzz
@ajborbzzz 4 жыл бұрын
This video really helps me a lot in understanding Django Rest Permissions. Thank you
@spatialnasir
@spatialnasir 2 жыл бұрын
Thanks for the explanation.
@Aaam1rK
@Aaam1rK 6 жыл бұрын
Really nice explanations of DRF. Hoping to see a complete comprehensive series (perhaps paid?) that covers advanced DRF concepts from you!
@prettyprinted
@prettyprinted 6 жыл бұрын
I'll definitely consider it.
@grijeshmnit
@grijeshmnit 5 жыл бұрын
Very helpful tutorial. Thanks
@hassanibrahim8732
@hassanibrahim8732 5 жыл бұрын
Great video. I’d love for you to make a video on how to use Django REST with ReactJS and how to configure both their routers with each other.
@davidmutua6971
@davidmutua6971 5 жыл бұрын
I came accross your django rest_framework videos on youtube as I found myself in need to expose some of my models as END POINTS and be able to use AJAX and to Prefill Dropdowns along with JavaScript Events on my UI. I believed this could solve my needs explained above when you posted on Postman and it worked. Did the same but on Insomnia and voila!!! The only issue is that I am using django rest_framework 3.10.1 and it doesn't work with HyperlinkedModelSerializer. Instead it throws an ImproperlyConfigured Exceptions. Thank You Sir. Tony.
@prettyprinted
@prettyprinted 5 жыл бұрын
You're welcome! Thanks for watching!
@mdk124
@mdk124 5 жыл бұрын
Thank you for making this series of videos man. How should I proceed if I want to use my own custom users to login instead of the model provided by Django? Is there a video I can look at?
@jorgedavalos5663
@jorgedavalos5663 4 жыл бұрын
Hello there! great tutorials. would you do the authentication one eventually?
@estebanmejia9989
@estebanmejia9989 5 жыл бұрын
thanks, it helped me a lot
@0xcoder542
@0xcoder542 4 жыл бұрын
Excellent work! Great videos you have created for Django and Python. I have a quick question here for you is regarding the permissions in Django Rest Framework API. The login credentials that you used for the demo where does it comes from? Can I just use the login that I created in Django admin site? Your response is much appreciated. Thanks in advanced.
@ekbergpeter6987
@ekbergpeter6987 4 жыл бұрын
Is it possible to give permissions depending on what is set in admin for users? Do You have any tutorial on this. I like the way you explain things here.
@ikhsanabdillah5662
@ikhsanabdillah5662 4 жыл бұрын
how to get csrf token ? when i use in frontend, i get some error like this Forbidden (CSRF token missing or incorrect.): /api-auth/login/ [22/Apr/2020 21:44:47] "POST /api-auth/login/?next=/api/ HTTP/1.1" 403 2513
@sairampanguluri888
@sairampanguluri888 5 жыл бұрын
Can you explain in detail about list of models like foreignkey, types of serializers, types of viewsets and their function like what did they actually do?
@kiranp45
@kiranp45 4 жыл бұрын
Hello, in my case log-in is not going to enable, i do follow all steps done by you. kindly help me. thanks in advance.♥
@BeLKa4444
@BeLKa4444 6 жыл бұрын
Thank you SO much for this video! Really. Thanks.
@prettyprinted
@prettyprinted 6 жыл бұрын
You're welcome! Thanks for watching.
@orlandog1979
@orlandog1979 3 жыл бұрын
Thanks bro....
@satishkurakula
@satishkurakula 3 жыл бұрын
Hi I need a small help from you, by using the rest APIs can I only restrict the user to edit and only the admin user to add or delete the users in the user list.
@xtremehackerzpro9511
@xtremehackerzpro9511 6 жыл бұрын
Please cover JWT also :)
@cvcarter929
@cvcarter929 6 жыл бұрын
This is a nice tutorial! Thanks! Are you planning to do one on object-level permissions?
@prettyprinted
@prettyprinted 6 жыл бұрын
Possibly. If I do a more complete series on DRF on my website, then I'll cover object-level permissions.
@serhii.chumachenko
@serhii.chumachenko 6 жыл бұрын
Nice job! Thanks!
@VIJENDRASINGH-zg2lp
@VIJENDRASINGH-zg2lp 4 жыл бұрын
Hi Anthony, I'm using Email instead of Username for user registration. When i try to login using Email and Password, it just doesn't . Can you please guide?
@Mostaqmahmud
@Mostaqmahmud 6 жыл бұрын
Thanks man. I want to know about the group based permission which you mentioned in the end of video. It's very emergency for me now for my current project. Can you please make a video asap(if possible) or can give me any reference ?
@prettyprinted
@prettyprinted 6 жыл бұрын
I don't plan on making a video on it anytime soon, but here are the docs: www.django-rest-framework.org/api-guide/authentication/
@ryan.aquino
@ryan.aquino 4 жыл бұрын
Hi , have you found any solution on this? django rest framework docs seems to be complex to implement
@trung7668
@trung7668 5 жыл бұрын
Do you have the code for that somewhere?
@stanleyjohn4670
@stanleyjohn4670 5 жыл бұрын
When it comes to logging in the credentials before viewing the JSON data, can only an *admin* user log in and view the data or can a random logged in user see/edit it as well? Example, if I was an admin user, I can see the JSON data. That's guaranteed. But what about a user named 'Rick'?. If Rick logs in using a normal login within a template, can he view and edit the api as well if he has access to it?
@prettyprinted
@prettyprinted 5 жыл бұрын
It doesn't have to be an admin user. You can have two approaches: allow anyone who is logged in to see all the data. Or you can make it to where only the creator can see their data. This tutorial might help: www.django-rest-framework.org/tutorial/4-authentication-and-permissions/
@mohi7solanki
@mohi7solanki 6 жыл бұрын
Please cover social authentication in DRF if possible.
@prettyprinted
@prettyprinted 6 жыл бұрын
Social authentication doesn't make sense with the API. Could you tell me more about what exactly you want to see?
@nurizzati5892
@nurizzati5892 5 жыл бұрын
@@prettyprinted it's possible to connect with social network? for example validate user credentials in twitter using django ?
@prettyprinted
@prettyprinted 5 жыл бұрын
@@nurizzati5892 Yes, look into the all auth library.
@rajshreesome3275
@rajshreesome3275 5 жыл бұрын
I am using the JWT for authentication but can we save this tokens in db?
@prettyprinted
@prettyprinted 5 жыл бұрын
The client could save the token to the database, yes. It doesn't make sense for the server to save the token.
@ZeroShrimpy
@ZeroShrimpy 6 жыл бұрын
are you planning to do React tutorials in future??
@prettyprinted
@prettyprinted 6 жыл бұрын
Yeah, I'll cover React eventually.
@hassanibrahim8732
@hassanibrahim8732 5 жыл бұрын
@@prettyprinted I’d love it if you could make a video on how to use Django (REST) with ReactJS and how to configure both their routers with each other.
@MS-ph2ol
@MS-ph2ol 3 жыл бұрын
You rock!
@louiejohnseno1810
@louiejohnseno1810 5 жыл бұрын
thanks man !
@prettyprinted
@prettyprinted 5 жыл бұрын
You're welcome!
@romko775
@romko775 5 жыл бұрын
Hey, how to make only readOnly permission, I want that users can make only get requests?
@prettyprinted
@prettyprinted 5 жыл бұрын
Try this: www.django-rest-framework.org/api-guide/serializers/#specifying-read-only-fields
@skyblaze6687
@skyblaze6687 6 жыл бұрын
Sir how to apply token on headers :, to make our android app working login it only generate token
@nurizzati5892
@nurizzati5892 5 жыл бұрын
thank you
@prettyprinted
@prettyprinted 5 жыл бұрын
You're welcome!
@abdulmueez267
@abdulmueez267 6 жыл бұрын
is there a place where i can download the source code?
@prettyprinted
@prettyprinted 6 жыл бұрын
Email me at anthony@prettyprinted.com and I'll send it to you.
@snowbord13k
@snowbord13k 6 жыл бұрын
There is some problem with permissions in views.py. I repeated everything, but it said that there some type error. I spend 1 hour to fix it, but not successful. But when I used that in global settings, everything was working. Thanks for the lessons!:)
@prettyprinted
@prettyprinted 6 жыл бұрын
Glad you figured it out.
@ThaEzioAuditore
@ThaEzioAuditore 6 жыл бұрын
Completely unrelated but I wanted to ask you this : did you study at MIT ? I'm currently going through 6.006 and during one the recitations I think I heard your voice. Would be cool if you did !
@prettyprinted
@prettyprinted 6 жыл бұрын
My high school grades weren't good enough for MIT. :\
@nguyenhung8195
@nguyenhung8195 6 жыл бұрын
Pretty Printed How to specify permissions per method when using class based views.
@mafirus
@mafirus 5 жыл бұрын
Where is the repo of this tutorial???
@prettyprinted
@prettyprinted 5 жыл бұрын
There isn't one because the code is simple. I still have the code though, so if you want it you can email me at anthony@prettyprinted.com
@nikhilbhardwaj6055
@nikhilbhardwaj6055 6 жыл бұрын
amazing
@prettyprinted
@prettyprinted 6 жыл бұрын
Thanks for watching!
@tabmax22
@tabmax22 2 жыл бұрын
yeah but now the frontend can't make post requests
@TheArtheanos
@TheArtheanos 4 жыл бұрын
Damn, I've always thought you were white because of your voice
JSON Web Tokens With Django REST Framework
16:58
Pretty Printed
Рет қаралды 91 М.
Django REST Framework Model Relationships
14:32
Pretty Printed
Рет қаралды 67 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
How to Handle User Authentication in Django
26:39
Matt Freire
Рет қаралды 86 М.
Restricting Access with Permissions (Django Rest framework)
10:03
CodingWithMitch
Рет қаралды 31 М.
Getting Started With Django REST Framework
26:31
Pretty Printed
Рет қаралды 199 М.
Adding Extra Fields On Many-To-Many Relationships in Django
17:45
Pretty Printed
Рет қаралды 43 М.
Django Rest Framework | Serializers & CRUD
22:40
Dennis Ivy
Рет қаралды 393 М.
Django REST Framework Oversimplified
9:43
Dennis Ivy
Рет қаралды 351 М.
Understanding Permissions in Django REST Framework
22:41
Django World
Рет қаралды 1,2 М.