Adding a CMS to Your Flask Web App Transcripts
Chapter: Welcome to the course
Lecture: What we'll cover

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So what are we gonna cover during this course? One of the specific lessons and chapters we're going to start by focusing on routing how
0:08 we describe and control which your URLs or Web site responds to. And what part of our Web app those Urals our map to?
0:15 You'll see that routing is the very center point of the CMS capability. Not super complicated, but it's going to be in this one place after all the
0:24 data driven stuff has happened. Or we're gonna lock in and grab onto the euro and get a chance to decide if this virtual idea of a page or a redirect
0:33 or something like that belongs to our CMS or it really is just a bad request and it's a four a four.
0:38 So we're gonna talk about routing specifically around how we add the capability to add CMS requesting basically catch every single request of the site.
0:46 Then we're going to start from an existing app. The ideas were taking a data driven Web app as I showed you in the beginning
0:52 and we're going to add the CMS functionality to it. So we have a rich, powerful Web app that we've already created,
0:59 and we're going to do a quick tour of that. So you're able to understand it and work with it and completely know what we're working
1:07 with as we start building on top of it there won't add to core CMS capabilities First is we're gonna create some kind of redirect service,
1:14 something like Billy. So, for example, if you were to go to talk Python dot FM slash YouTube,
1:20 that's going to redirect you over to YouTube with some huge, terrible girl that I honestly can't remember.
1:25 It's like 20 random characters. So what we'd like to do is one of the features of our CIA masses. Have the ability of simple,
1:32 short, memorable your l's that we can share on social media that we can put in other places and to say,
1:39 like signature of an email, something like that. And then it will actually take you to the real page,
1:44 either somewhere else on the site or somewhere even external. So we're gonna take our first step into the CMS world by adding this redirect feature
1:53 to this app and then more in line with Brian what you're imagining. We're gonna add basically the capabilities of WordPress to our site.
2:02 And what I mean by that is the ability to create arbitrary landing pages with rich
2:07 formatting with a rich editor. Control the or Els determine whether or not their public or hidden those kind of things.
2:13 So we're gonna have these redirects, and then we're gonna add the's pages now. Actually, having them displayed in our site is pretty straightforward.
2:20 But having the admin section to properly work with them and edit them, that's gonna be a lot of what we're gonna focus on on Chapters three and four
2:26 Of course, we want to save this content to the database. Up to this point, we're not actually gonna worry about the database,
2:33 which is going to use, like bake in memory structures that will stand in for the database. But eventually we're going to say,
2:39 Let's stop for a minute and store this into our database using sequel alchemy. I'll show you how to do that.
2:45 We also have an appendix on sequel alchemy. If you're not familiar with it, you can check out the appendix, but we don't go over in the course proper.
2:52 Each team Els Ah, decent format, but it has a lot of problems. It's hard for people to make sure they make no mistakes.
2:58 They close every opening Div as a closing div and so on. So for the most part, we're gonna leverage mark down.
3:05 But we're also going to see that we can bring in little bits of HTML of you need fancy formatting like a giant image that spans the top of the page or
3:13 something along those lines. We also want to have a rich editor. We're gonna need a really nice editing experience,
3:18 both for beginners who are not familiar with HTML a markdown,
3:22 but also something with cool hot keys and highlighting and color hints and whatnot for people
3:27 who know what they're doing but just want to have a much better experience.
3:30 So we'll see that what can bring in some really powerful back in editing tools for
3:34 our pages. And then we're gonna bring in a library that lets us reuse parts of mark down within other pages. It's dramatically, dramatically, faster.
3:45 You'll see. We'll get, like, 100 times speed up by going from standard mark down to this advanced markdown system and
3:52 so on. So we're gonna use this other library that take some of the ideas here but makes them very high performance,
3:58 more reasonable and just gives new capabilities to our whole CMS. One reason mark down and HTML.
4:05 And finally we're going to add a little bit of logging to make sure that we get good visibility to what's happening in our application.
4:13 And so this is what we're gonna cover. I think it's not super hard to build,
4:17 but it adds an incredible capability to our Web application that's gonna pay off for years and years as other people can log in work with our Web app.
4:25 In a lot of the pages that were creating or managing, don't require developers to go change code and then redeploy it.
4:32 That's just more like WordPress. You log in and you edit the page,

Talk Python's Mastodon Michael Kennedy's Mastodon