Adding a CMS to Your Flask Web App Transcripts
Chapter: The pages (our WordPress)
Lecture: Editing CMS pages

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now we can add new pages. Let's go and edit them. Yep. Okay, I start all over again, but this time it's gonna be even easier and quicker.
0:09 So here we have added new page. Let's just go and copy this for our edit number. It's really, really similar. Basically,
0:19 add is a subsets We're gonna go through replace and with edit all over instead of create. We want to update a page. I'll use the page. I d like that.
0:39 Now, this function doesn't exist, but we're gonna work on it. One other thing we have to do, though, is in our your URL on our route.
0:46 We need to pass across the page. I d so wants a page. I d like this now notice. Preterm says it's missing missing from the function.
0:59 And let's be clear, this is an energy er and we can even get flash to convert it to an energy like this.
1:07 And of course, we need this on both versions and here doesn't expect to pay Jaidi. Yes, it does. It just uses an empty one if you don't specify it.
1:20 So let's pass that along. Oh, well, let's see if the at it get edit part will work force. Earlier, we had a 44 rulings like this.
1:32 What if we click on it now? Not running. Let's see. Is it not running? Let's go ahead and just rerunning. What did we miss? Add page post.
1:45 We don't want ad. We missed it at it. So while we're here, let's go ahead and add this function. This is gonna be an int the rest of strings again.
2:06 This is gonna be a whole lot like updating a read the redirect so borrow from over there. Perfect. So first win a rename that page.
2:21 That and the Slavic It page by I d and page I d. Beautiful pages. Get the you, Earl. I remember we were storing these by there.
2:40 You or else, we got to make sure we get rid of it. Case. That's the thing that changed. This is gonna be title that strip.
2:49 Okay. And contents dot strip. All right. There's a chance we can edit this now, so let's go and try again.
3:06 I got to restart it one more time. Come back over here some reason it forgot about me over your page. And let's add a new test page.
3:18 Best. This is to be tested and try to create it. Yes, there it is. It works big. Here's the big tests. Can we edit it?
3:30 And it will that form start with the data? We expected no new. We cannot so edit pay admin slash edit page slash something What have we missed? Uh,
3:44 we missed afford slash Right there. See it? So close. So close. You see? Let's wait, Dragon. All right? No, not quite.
3:55 It's showing the page. If we go here and click Oh, it's because it couldn't find it. That's why. Let's go and add it again.
4:01 We started, we lost, which is fine, but it's gonna know Try again. Yes. Look at that Apple T test for the title of lower case test.
4:16 Let's change that to Tee. This will be test page and let's just put a little HTML. Remember, we're going to make this better,
4:23 but for now, you gotta put HTML stuff in here. All right, so we've changed everything. The page title, the euro and definitely the contents.
4:35 That's a view. It ceded it. Take it. Yes. Look at that. The Uriel changed. Now it's not just test its test page,
4:42 and there is our bulleted list that we just added super cool. And there we have it. Our page CMS is totally working.
4:52 We can create new pages. We can edit existing pages. We're not storing them in the database yet, So they go away every time we start rap,
4:59 which is a little bit annoying, but we're gonna remedy that really soon. Nonetheless, we have this working form our CMS log in and create these pages.
5:09 Really? Well, at least the website of things. We'll get the database stuff working soon.


Talk Python's Mastodon Michael Kennedy's Mastodon