Adding a CMS to Your Flask Web App Transcripts
Chapter: Course conclusion
Lecture: Review: Redirects

Login or purchase this course to watch this video and the rest of the course contents.
0:00 once we said, If the routing we know that every single request to the website
0:04 is first going to go to our regular Web application and it's going to try to go and run through the various specific date it of in pieces.
0:13 But once we decide once the site decides that's not a good fit,
0:16 none of those match every single request is going to hit this single CMS underscore request function view method that we wrote here.
0:25 And so this is where we're both redirecting and showing pages. So what we did is we use the View model pattern,
0:32 which handled a lot of the determine whether there's a user figure out whether the euro's
0:37 meaningful pulling back the pages, pulling back the redirects and handling all the data access
0:41 bits there. So we create this seem s request view model and we ask if there's a page, just show it. There's a redirect redirect to it.
0:50 Otherwise we're going to return a 44 and so that's really all there is to it
0:55 again. The actual implementation of a simple CMS if you don't care about performance and
1:01 element reuse like with that import statement stuff is pretty straightforward.
1:05 So here is that one function that handles the displaying for the user the consumption of

Talk Python's Mastodon Michael Kennedy's Mastodon