Django Rest Framework for Beginners - Simple CRUD API
Django Rest Framework is a powerful tool to create fully functioning APIs with Django. In this video I will show you how to use its basic functionality to create a simple CRUD API that has a database, query parameters, and one-to-many database relationship.
Code: github.com/jhn...
Support Me:
Patreon: / johnwatsonrooney
Oxylabs: oxylabs.go2clo... - code JR15
Amazon UK: amzn.to/2OYuMwo
Hosting: Digital Ocean: m.do.co/c/c7c9...
Gear Used: jhnwr.com/gear/ (NEW)
-------------------------------------
Disclaimer: These are affiliate links and as an Amazon Associate I earn from qualifying purchases
-------------------------------------
timestamps
00:00 Install and Setup
00:54 Models
02:49 Admin
03:17 Migrations
04:20 Project URLs
05:20 Serializers
06:50 API URLs
07:55 Views
11:42 Runserver
12:05 Usage
Пікірлер: 56
so good, by far the best DRF quick video! no BS start from 0 and so detailed explaination. Just go straight into the tight integration with Django which yields the least code, so good, thanks bro!
One of the best tutorials I have ever watched - straight to the point, no waffle.
I easily picked up, this is a quick and great refresher video... Thanks
Thank you for helping us to have a better society by sharing code. Great!!
@JohnWatsonRooney
Жыл бұрын
Thanks!
Thanks alot this vedio gave me a decent introduction into django rest framework
This is truly a lifesaver tutorial sir, thank you for your great videos!
Like and comment to feed algorithms.
@hrvojematosevic8769
2 жыл бұрын
Did my part
thank you very much you explained it very well🔥🔥🔥🔥🔥🔥🔥
Awesome introduction to framework, i liked it
Straight to the point, awesome tutorial.
Hey John , can you do a video on how to use Sitemap spider on scrapy ?
Very good content. Great job, John! :)
Would love to see the equivalent but for FastAPI Your content is 10/10 btw, been subscribed for a while now and love every upload
@JohnWatsonRooney
2 жыл бұрын
Thanks! Yes I was going to do a similar project with fastapi and flask then give my opinions on them all
Cool tutorial John, thank you!
I want to get the Create, delete, update, view links to use them in other places, like Postman or any other app, How to do that?
@John Watson Rooney you are the best can you add more tut about Django channels and Redis (please real-time app)
This is simple, thanks!
Great tutorial, so well explained! I have a question, if I wanted to add some business logic within this example, where should I add it? Let's say we have restrictions to create models, and they can only be created if some condition is True, where should I put this assertion? Thank you for this content again man, it's super helpful.
@JohnWatsonRooney
Жыл бұрын
thanks! What I do is put business logic either in the models file if it fits there, or create a new file for it called logic or services
We love you, John
@JohnWatsonRooney
2 жыл бұрын
Thanks!
Very well explained for beginners! I personally prefer to create pytoml project file and recursively install the dependencies, also fix the possible conflicts when switching the versions. I might do a video where I explain this part
great job, well done,
Thanks for the best vedio of drf please let me know about strip payment gateway
just found out ur profile man, looks good!!!! i wonder why django and not fastapi for such tasks tho? or at least flask?
@JohnWatsonRooney
Жыл бұрын
More videos coming for flask and fastapi - I do think django is great though it’s my go to
@heeku_
Жыл бұрын
@@JohnWatsonRooney would love to have a chat with you sometime mate :) btw just subbed, wonderful channel!
Hi John! First of all, amazing content! I just want to know if you’re using SQLite for this project. If so, what is the alternative and what all changes should be made?
@JohnWatsonRooney
6 ай бұрын
I am yes - dropping in postgresql though is very easy in Django and I’d recommend that from the start for most applications
Thanks you so much man. Can you do a video on how to use REST API in React?
@JohnWatsonRooney
2 жыл бұрын
Hey thanks, front end isn't what I focus on but I have some ideas for videos on consuming APIs that should be of interest
Very helpful one..🎉
Great tutorial John, I see that it is only 6 months old, so it is all very up to date, do you think it has had many changes in this period? with restframework lib or django? I followed step by step the same way as you, but when I call a location/id it is showing a dropdown menu with the other locations below and gives error when updating
fast… I’ll watch again in slow motion to follow it better - Loads of useful info in here…. thanks
@JohnWatsonRooney
11 ай бұрын
fair enough, I'm trying to pace my content better now going forward
nice one
13:18 instead of itemLocation :1 is it possible to get itemLocation :Storage Unit ????
Thank you for the video. What theme do you use in the IDE?
@JohnWatsonRooney
2 жыл бұрын
Thanks, it’s One Dark for PyCharm
Is this saving the data in a database or does it delete when you stop the server?
@JohnWatsonRooney
2 жыл бұрын
It's saved to the database
I tried to run migrations but I am getting this error "ModuleNotFoundError: No module named 'rest_framework". Should I comment rest_framework in settings and continue?
@felixkimutai8478
Жыл бұрын
I found the error, thank you.☺
Hi, do you freelance? I really need someone with your skills to finish a product im working on?
cool
jimmy neutron what are you doing here
So, Is THIS the Easiest Way to Build a CRUD API? shoud I learn Django? Is there another EASIEST WAY?
@hrvojematosevic8769
2 жыл бұрын
I recommend checking out the FastAPI project
@TheWagnerufpr
2 жыл бұрын
@@hrvojematosevic8769 Nice thanks. I will see
voice is too low
Even though I appreciate a showcase and coding along of a simple CRUD API, I do not understand the mixing of camelCase and snake_case, and frankly, without a test first approach, just throwing all components here like that makes very little sense. Overall, I do not recommend coding like this.
Great tutorial. Tks. And if there are more than one location per item ? how can i set the model ? one to many relationship
hi how are you your course is cool do you have telegram account ?