Django REST API Tutorial - Guide to Viewsets, Routers and Serializers #2 (2018)

  Рет қаралды 59,549

The Dumbfounds

The Dumbfounds

Күн бұрын

In this django rest api tutorial series I will teach you about REST API design and show you how to implement one using the django rest framework.
7 Tips For Getting Better At Django:
mailchi.mp/dea592ab3f6d/tips-...
Get the starting point on GitHub:
github.com/TheDumbfounds/djan...
Working from the big picture into the details, in this part you will first build a very simple REST API that works, and afterwards explore what the components we used to build it, namely viewsets, routers and serializers really are and why they are used in just 11 minutes!
The next part will be focused on exploring authentication and permissions, which you can use to secure your REST API. More specifically, you will learn about token authentication, but also get an introduction into other forms, such as session authentication.
Anyway, you can find the details in the video and feel free to ask if you have any questions!
If you enjoyed this video, make sure to subscribe and share it with anyone you think could enjoy it as well.
I hope to see you inside of the next episode,
Cheers.

Пікірлер: 60
@FernandoPosserPinheiro
@FernandoPosserPinheiro 5 жыл бұрын
Great! Your tutorial is so clean and show just what is necessary. Very good, keep going, man!
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Thank you, Fernando! Appreciate the feedback.
@mbrav
@mbrav 3 жыл бұрын
Thank you so much! I have been crushing my head while looking for tutorial on this specific topic. You explained everything so clearly and concisely.
@jayvrjz4615
@jayvrjz4615 3 жыл бұрын
This was the final piece in the puzzle to understanding viewsets, I was a bit confused with the documentation, but damn you unconfused me in 11 minutes, great vid!
@alehandr0s
@alehandr0s 4 жыл бұрын
Your tutorial is way better than many other paid ones. Simple and straight to the point. Kudos!
@siluros
@siluros Жыл бұрын
3 years later, this is still true.
@lokeshkatikireddi1924
@lokeshkatikireddi1924 3 жыл бұрын
Very good. Clear and straight forward. Keep going. Liked and subscribed
@saber913
@saber913 2 жыл бұрын
Best tutorial so far!!!
@erickramones2167
@erickramones2167 4 жыл бұрын
Great videos. They are well explain and easy to follow.
@tri-aayam
@tri-aayam 2 жыл бұрын
Finally someone made a good tutorial
@kaarthigeyanrajendran5513
@kaarthigeyanrajendran5513 5 жыл бұрын
Great tutorial man,can any one help me how to get newest if we have a multiple snippets?
@nimda2sdfsdfsd
@nimda2sdfsdfsd 3 жыл бұрын
Great Indepth tutorial, Can you put a tutorial about Generic viewset, mixin when to use it, also put a video on Related models with serialiser. all the operations like CRUD
@MrA86S
@MrA86S 5 жыл бұрын
Thank you for this wonderful tutorial
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Thanks for your wonderful comment!
@hafeezshaik1221
@hafeezshaik1221 4 жыл бұрын
Hi bro, how can authenticate manually created tables fields of mysql workbench in django restframe work and how to return token , some data.... please give me answer
@mail4upendra
@mail4upendra 4 жыл бұрын
Very Helpful. Thanks
@topiaamr
@topiaamr 6 жыл бұрын
Great job! Keep on
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
Topia Amr thanks buddy!
@amishashukla1944
@amishashukla1944 4 жыл бұрын
Great job😇✨
@himanshushekhar627
@himanshushekhar627 4 жыл бұрын
amazing...thank you :)
@GabrielaReyes-nq8qx
@GabrielaReyes-nq8qx 6 жыл бұрын
Thank you so mucho for this!
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
You're welcome, thanks for watching!
@turbokev3772
@turbokev3772 4 жыл бұрын
`HyperlinkedIdentityField` requires the request in the serializer context. Add `context={'request': request}` when instantiating the serializer.
@benjcarlsamson9738
@benjcarlsamson9738 2 жыл бұрын
kudos to you sir!
@emilianomatarazzo4712
@emilianomatarazzo4712 5 жыл бұрын
What about triggering DESTROY view? If I send a POST request it trigger CREATE not DESTROY.
@Thesrik23
@Thesrik23 6 жыл бұрын
Awesome man
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
thanks for watching!
@georgesmith3022
@georgesmith3022 5 жыл бұрын
sorry i think i am missing something, in which video did you create the snippets app?
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
In this one: Django Fundamentals For Beginners - Get Started Quickly!: kzbin.info/aero/PLbpAWbHbi5rMM3i--gfgjwQ404DZmwwd3
@amruthap6334
@amruthap6334 4 жыл бұрын
thank you .. 😊❤
@EddyCaffrey
@EddyCaffrey 6 жыл бұрын
Great job bro
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
Thanks buddy!
@urebhasan3061
@urebhasan3061 5 жыл бұрын
Thanks for this tutorial! I am facing one issue, my migrations dont create a Snippets. Any reason why that is happening?
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
The migrations create the database columns, not the snippets themselves.
@urebhasan3061
@urebhasan3061 5 жыл бұрын
@@thedumbfounds767 I meant migrations do not create a snippets table
@urebhasan3061
@urebhasan3061 5 жыл бұрын
@@thedumbfounds767 I figured something which i'll try out
@JesusGil90
@JesusGil90 4 жыл бұрын
The Router.register base_name argument has been renamed in favor of basename . Usar basename en el registro del router
@jamesjassi37
@jamesjassi37 4 жыл бұрын
yes i found it
@jamesjassi37
@jamesjassi37 4 жыл бұрын
instead of base_name, basename is working for me.
@k00ka
@k00ka 5 жыл бұрын
I've tried so many times to work with django rest api and I stlil can't get it to work. This tutorial got me the farthest but I get the error "unable to import snippets.models" and if I add the full path it says the top level directory doesnt exist....I'm so frustrated with trying to get this to work ....someone please help
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Share your file in a reply. It should say from snippets.models import...
@amruthap6334
@amruthap6334 4 жыл бұрын
.models i guess this will work if you are in the same directory
@turbokev3772
@turbokev3772 4 жыл бұрын
Well it works with ModelSerializer I guess but not HyperlinkedModelSerializer. You forgot to mention that.
@birarakisarap
@birarakisarap 5 жыл бұрын
django 2.0.5?
@akashkandpal1832
@akashkandpal1832 5 жыл бұрын
Hi Sir, if possible could you create a slack channel or discord one or even telegram for your You-Tube channel so that we can have a community for django development. We can discuss and tackle problems this way more profoundly. Or if you recommend some active community for django developers, please inform me too. Thanks.
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Let's for now use the youtube comments ;) On reddit I know about /r/django and /r/djangolearning.
@akashkandpal1832
@akashkandpal1832 5 жыл бұрын
@@thedumbfounds767 i am already in those communities. Comments on You-Tube are tough to scroll and reply. So was thinking of some other platform if possible. You can mention the link to the channel under your You-Tube videos :) BTW decision is upto you. Thanks for these wonderful videos.
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
@@akashkandpal1832 Thanks for watching. At the moment, I don't really have the will/desire to do so.
@akashkandpal1832
@akashkandpal1832 5 жыл бұрын
@@thedumbfounds767 okay. Thanks for such content-based videos and also doing some videos with Arun Sir, he is a great guy, I have read some of his blogs.
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
@@akashkandpal1832 ur welcome! Yes, he's a great guy.
@alireza8923
@alireza8923 5 жыл бұрын
tnxxxxxxxx
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Welcome!
@QuranicLens
@QuranicLens Жыл бұрын
Copy and paste from REST API documentation.
@turbokev3772
@turbokev3772 4 жыл бұрын
I'm done watching your videos they always start out so great then the same always happens. I get stuck with code that would be wonderful if it actually worked, but it doesn't. localhost/api/snippet/newest ERROR!!!!!!! `HyperlinkedIdentityField` requires the request in the serializer context. Add `context={'request': request}` when instantiating the serializer. Went over the video a hundred times and can't figure out how to include the 'request' when instantiating the serialize. And the docs are way out of this context when explaining the error. I was so pleased with this video and felt I struck a gold mine till I got to that bit at the end, learning to migrate from php backends to python and Django . Care to provide the missing code?
@usamakaleem8378
@usamakaleem8378 4 жыл бұрын
cant understand your way
@chuckynorris616
@chuckynorris616 5 жыл бұрын
What the hell is that noise? Are u typing using a typewriter lmao
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Lol, a mechanical keyboard at its best!
@rgenericson5361
@rgenericson5361 5 жыл бұрын
Lol
@chisangamumba2961
@chisangamumba2961 Жыл бұрын
Are you Scottish?
Django Rest Framework for Beginners - Simple CRUD API
14:22
John Watson Rooney
Рет қаралды 47 М.
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 38 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 122 МЛН
GraphQL Tutorial - Full Guide To Making Queries (2018)
9:15
The Dumbfounds
Рет қаралды 51 М.
Django Rest Framework | Serializers & CRUD
22:40
Dennis Ivy
Рет қаралды 382 М.
Difference Between REST API vs Web API vs SOAP API Explained
7:24
Learn with Whiteboard
Рет қаралды 170 М.
Getting Started With Django REST Framework
26:31
Pretty Printed
Рет қаралды 199 М.
ViewSets in Django Rest Framework and Types #10
13:26
IamPython
Рет қаралды 10 М.
Just Use Pydantic
8:11
John Watson Rooney
Рет қаралды 22 М.
Radoslav Georgiev - Django structure for scale and longevity
45:27
EuroPython Conference
Рет қаралды 45 М.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 74 М.