Adding a CMS to Your Pyramid Web App Transcripts
Chapter: Advanced Markdown templates
Lecture: Using markdown-subtemplate in the viewmodel

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So let's get started using this markdown sub template.
0:03 The first thing we gotta do is put it into our requirements ball here and let's tell it that it's spelled correctly and by charm, right away knows.
0:11 Oh, this needs to be installed because its requirements file. So just go and hit that, See down here and wait for a second.
0:17 And alright, super, it's installed and we should be able to use it.
0:21 Then we're gonna come over here and we're not gonna actually use this markdown stuff. We're gonna import some other things.
0:28 We're gonna import markdown sub template like that and down here and sit a saying self dot convert to mark down, which we no longer need to do.
0:37 Good comment. That one out they sell thought HTML equals markdown sub template dot There's this thing called an engine.
0:43 And there we can call get page are just going to give it some euro and potentially some piece of data. The or l is.
0:51 Well, self doubt Euro and the data you can see the default is an empty dictionary.
0:57 So we're not gonna pass any data but like you would see over here and say this section.
1:04 World War You're like passing over the your L and passing over the title. The markdown sub template allows us tohave.
1:10 Variables that are replaced with content were passing in. But that doesn't really match our use case here, so we're not gonna mess with that part.
1:16 So this is all we have to write. Let's give it a try. It's not gonna work as well as you want. And there's a lot of things we still got to do.
1:23 They're not hard, but there's a few more steps. Let's go look at help. Uh, nope. We haven't set up the storage engine. That's too bad.
1:32 So that's the next thing we have to do is we have to basically create one of these storage engines either a built in one like the file based one, and configure it or we have to create a different one.
1:44 A little extension for talking to the database turns out, is really, really simple, but we do have to do that, so that's what we'll have to do to get this working next.
1:53 But we're actually pretty

Talk Python's Mastodon Michael Kennedy's Mastodon