Adding a CMS to Your Flask Web App Transcripts
Chapter: The redirects (our bit.ly)
Lecture: Cleaning up the HTML
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
we pretty much have this working. We're over here. We can had a new one. Let's add redirect, hampered her stuff and click the add redirect button.
0:09
And we can edit one over here where we wait a minute. What is this? We have add, even in our edit. So we need some way to indicate Is this and edit
0:20
mode or is it in ad mode? And the trick will be whether or not we're passing along one of these redirect i ds. So let's go down here and look at this.
0:29
It turns out that I made a little bit of an error in this one. That should be redirect I d. It was passing I d over and some circumstances,
0:39
but not all of them. Actually, you know, it's in the euro we don't even hear. So what we do need to know, though, is whether or not there's an I D.
0:48
And that's by using the redirected e. So here, check this out. We have add, could have edit and and flask weaken more like more specifically in
0:57
Jinja to come over and say, we're going to have edit. If there's a redirect, my dear, that's not empty else.
1:05
We're gonna put ad right there and then we could do this in the button down below as well. So change this ad,
1:12
Teoh. Sometimes that it sometimes add make that lower case to be consistent. Now we come over here and we refresh that we edit the redirect,
1:22
and here it's a edit or save or something like that. Now here, if we want to create a new one, it's an ad ad. And if we want toe edit an existing one,
1:34
it's at it. And at it, super, super easy. Just this basically that little bit of text instead of just
1:41
add and we're off to the races that pretty much wraps it up. Our edit, CMS said, Well, basically are redirect CMS is more or less complete.