So my next step is to create some handlers and what I normally do in situations like this, where I've
created three or four new routes to the application, is I go and create stub handlers.
So the first one I've done is for new reservations.
So I'm going to copy that Eurail and I'm going to go back to my roots file.
And inside my admin, part of my roots, the part that's protected, I don't want everybody to have
access to the particular pages that are in the admin.
So I make sure you put it inside this part.
Muxtape root for admin.
I'll create a new handler, just a stub handler, Mux doGet and I'll paste in that you URL and I'll
delete the slash admin part because that's automatically added by this thing and I'll create some stub
handlers so handlers don't repo.
And this one is new reservations.
And since it's an admin, I'm going to start it with the name admin.
OK, just like I did admin dashboard here.
This just lets me keep my handlers nice and clean so we have one for new reservations.
We have another one.
I believe it's for all reservations.
It's over here.
Yeah.
Reservations dash all so I'll create one for admin all reservations and change the euro to all.
And I have one more.
And what was that called.
Reservation dash calendar one for that to.
Reservation calendar and actually probably should be plural just to keep things consistent so that an
ass back in the admin layout just change out to reservations calendar.
OK, so now I have these three routes set up, but I have no handlers for them.
So we need to create a new handler called admin new reservation.
So let's do that.
Let's go to our handlers.
And at the very bottom, I'll create a new function.
I'll just duplicate this one and change the name to admin, new reservations.
And then I want to have a page for that, which I'll have to create in a minute, and I'll call it new
reservations, OK?
And then I'll duplicate this again and I'll get the correct path name, which is admin all reservations
and go back to my handlers and put it in all reservations and make that admin all reservations for the
name of the template, which I have to create a minute.
And finally, the last one is admin.
Reservations calendar, so I'll copy that name, go back to my handlers and change this to so admin
dashboard, I mean, all reservations have been new reservations, duplicate this paste in the correct
name and change that to admin reservations calendar.
And I will just create three new templates.
So the first one has to be called admin all reservation.
So I'll copy the names so I don't make a typographical error created here.
New file paste.
And added to my git repository and go back to my handlers and get the next one, which is admin new
reservations, copy that, create a new template.
Paste in the name added to my git repository and finally looks like there's an error somewhere in here,
but I'll get that in a minute, copy this one and go back and create a new template.
And paste in that name and add that to my get repository.
Now let's see what the areas and handlers it says there's an error here somewhere at the very bottom.
So where is it?
Oh, I got a slash in there and get rid of that.
OK, so now those exist, but there's nothing in those templates.
So let's just take our dashboard as a starting point.
Select all and copy and we'll do one for all reservations and we'll change the name to all reservations.
And make this all reservations content, select all copy new reservations, make this new reservations
and new reservations, and in here we'll do reservation calendar.
And we'll just changes to the reservation calendar content.
OK, let's stop our application, start our application and let's see if that worked.
So I'll reload this page and I'll have to log in, of course, because I started and stopped my application
admin added Mint.com password log in and that gets me here.
Let's go to the dashboard and see if these all work.
So reservations.
This should show me the new reservations page with just some dummy content here.
And it does.
This should show me all reservations and it does.
Now let's try the reservation calendar.
Good.
So now we have some stub handlers in place, so in the next few lectures we'll start putting the logic
in here that allows me to show new reservations, to show our reservations and to actually put a calendar
in place, a really simple one that allows me to turn blockings or blocks on and off and shows which
dates are already busy with existing reservations.
And we'll take care of that in the next few lectures.