So I think the first step for us is we've got to have a place that we can write our API code.
We should make an app for our API and then we should also add the jingle rest framework into our project.
So let's go ahead and go back to the terminal where currently the server is running.
So I'm going to do a control C to stop that.
And then what I'm going to do is add a new app by saying Python three managed up high start app and
I'm just going to simply call this API.
OK, so now that we've added that, let's go ahead and open up this project and Adam so that we can
get a good view on what it is that we're looking at.
Open up the to do project.
And here it is, you can see inside of the project, we have this API app that we just created, but
then there's the existing to do app with all of its models and what not.
And then we have the to do, which is got our settings and all those different pieces there.
So let's go ahead and make sure that we add the Django rest framework into our project.
Now, you should already have the Django rest framework installed on your computer, but just in case
you haven't remember, that's PIP three install.
And then we want to do Django rest frame work.
All one word game.
But we've already got that on the computer here.
So not an issue, but with this now let's go ahead and move back to our settings and we want to go into
our installed apps.
So we're going to first add the app for our API.
That we created up there.
Right.
And then also we want to do our rest underscore framework.
Don't forget that trailing comma there so we can add more if we need to.
OK.
So I'm gonna go ahead and save my settings, stop pie.
And with this, really, the next thing that I'd like to do is set up the URLs a little bit better in
this project than we did last time.
Now, it didn't really matter because last time the whole entire project was an API.
But where we are here, you can see if we go to our U.
URLs, that pie, there's already quite a bit moving on here.
I'd like this sort of separate the API code to be at API.
Your ls rather to be completely separate from all the other your URLs.
So what I'm gonna do here is just leave a comment to say that says, you know, this is the API that
we're working with over here.
And what we're gonna do is create a new path, get that trailing comma.
But what we'll do here is just sort of forward everything into the API app.
So what we're gonna do is say if anybody, you know, type something in here that says API slash, we
want to forward it.
So we're going to say that API slash is going to use and include.
Okay.
And what we want to include is a u r el's dot py file, which we don't have yet.
So let's go ahead.
Move over to this API folder.
I'm going to Right.
Click and say new file.
I want a u r stop pie.
Okay.
Now that that exists there you can go ahead.
Move back to are your URLs that pie for the whole project.
I could say please include api dot u or else.
Okay.
Now, since we have done this, we've got to make sure that we have the proper code to use this include
and currently it's not listed up here because we haven't done in include yet.
So just after path here, make sure you add a trailing comma and then do include Kane.
We'll go ahead and save that.
And with that, we're at a really good starting point for our app.
Were saying any information, anything that's, you know, API slash.
We're gonna forward this to this your El's Dot Pi file here inside of the API app.
We've got the Gengel rest framework ready to rock and roll.
Let's go ahead and move into our next lecture.
WorldWar Start knocking out functionality in our API.