Wagtail release candidates testing, step by step

This video features Sage Abdullah and Thibaud Colas at Wagtail CMS 2025 .

Wagtail release candidates testing, step by step
1:12:49
Published January 24, 2025
552 views

Core contributors Sage Abdullah and Thibaud Colas try out the release candidate version of Wagtail’s upcoming 6.4 release.

They go through the release notes, their thinking as maintainers, and the importance of release candidates testing for open source projects. They then try some of Wagtail 6.4’s changes on the wagtail.org website project


💻 Wagtail is the easiest open-source Python CMS to use:
Install the demo and start building your first site in 10 minutes: https://wagtail.org/get-started/

📹 Related Videos To Watch Next:

â–¶ Quick Video Tour of Wagtail CMS 6.0 https://www.youtube.com/watch?v=_Vg_lPMipcQ
â–¶ The Latest on Wagtail AI https://www.youtube.com/watch?v=4zfs1u4Vy5Y
▶ What’s New in Wagtail CMS 6.0 https://www.youtube.com/watch?v=2AxLFyOFjQo

📣 Follow us on social:

#WagtailCMS #Django

Summary

Sage Abdullah and Thibaud Colas demonstrate how to test a Wagtail release candidate against a real project, using wagtail.org rather than only the Bakery demo. They explain why release-candidate downloads and real-world testing matter, then set up Wagtail 6.4 RC1 with Docker and test release-note items including Django Tasks integration, reference and search indexing, StreamField block previews, documentation, and the new shorthand syntax. The testing exposes practical setup issues and areas needing clearer documentation, while also showing that some features—such as block previews—require project-specific templates, styles, and configuration before they are useful.

Key takeaways

  • Release candidates need testing on varied real-world projects because demo sites cannot represent every configuration or custom feature.
  • Wagtail tracks release-candidate downloads to measure how widely pre-releases are being tested before the final release.
  • The Django Tasks integration can move work such as search and reference-index updates out of the request-response cycle, but its behavior requires targeted testing and configuration.
  • StreamField block previews help editors choose blocks by showing their appearance before insertion, using preview values, descriptions, and templates that projects must configure.
  • The shorthand syntax reduces the amount of code needed for common Wagtail definitions while preserving the ability to use the longer form for customization.
  • Testing a release candidate also reveals documentation, template-loading, styling, and developer-experience issues that should be addressed before or during release.

Summarised automatically from the transcript.

Transcript

7,997 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:01

Speaker 1: Go.

0:03

Speaker 2: Hello.

0:04

Speaker 1: Hey Sage.

0:05

Speaker 2: Hello, T-Bug.

0:07

Speaker 1: What's up?

0:08

Speaker 2: Good. Thanks. How are you?

0:11

Speaker 1: Great. I have some good news for you today.

0:13

Speaker 2: Oh, what is it?

0:15

Speaker 1: We have a Wartail, release, candidate to text!

0:20

Speaker 2: Wow.

0:21

Speaker 1: I know, right?

0:22

Speaker 2: When did that happen?

0:24

Speaker 1: Well, honey, you should ask. I have the dates right in front of me. Just a sec. Hello.

0:35

Speaker 2: Wow.

0:38

Speaker 1: Have you worked on this release, Sage?

0:41

Speaker 2: Oh I

0:43

Speaker 1: Let's be real. How much of your heart and soul have you poured into this over the

0:48

Speaker 2: last

0:49

Speaker 1: many months?

0:51

Speaker 2: A lot. It's hard to quantify, I think.

0:55

Speaker 1: Let's give ourselves some love. Let's give ourselves one favorite. Okay. Let's take a look, shall we?

1:01

Speaker 2: Yeah.

1:03

Speaker 1: Sage, I don't know if you've uh done this before. Have you ever tried um PS Candidate on the Real World project?

1:10

Speaker 2: Bakery demo is all I got.

1:12

Speaker 1: Bakery demo, our official demo site.

1:14

Speaker 2: Yeah.

1:16

Speaker 1: It's pretty rare for me as well. And um That's why we thought it would be really cool for us to actually try it out proper. Give people an example of what it looks like to try a release candidate of Wagtail on a project. We have the release candidate announcement posts from our colleague Matthew, aka Gasman, that says has quite a bit more details on um uh what it means to try out a release candidate and what to look out for in a specific release. Um and uh it's also very timely because it's not just White that has a release candidate or I guess I guess has a pre-release to try it, you know, another project. Sage that might have a pre-release at the moment. Starts with a D.

2:02

Speaker 2: Does it end with an O?

2:08

Speaker 1: Yes, it does. Django 5. 2 Alpha 1. Should we try the Django Alpha and Aries candidate at the same time?

2:18

Speaker 2: Oh, that would be fun.

2:19

Speaker 1: That would be fun, yeah. I don't even know if that's Possible, but um have you looked at the Django Rase candidates yet?

2:28

Speaker 2: Well, I'm running the dev version on my machine.

2:35

Speaker 1: There are quite a few things on here I have been aware of and lots more that I have not seen yet. So it'll be very interesting to spend time on there. We'll see if that's possible. It'll be fun to try I thought before we get going with um with this, I'll thought I'd also share um I guess some context on how important this is for us, the release candidates, and I assume the same for Django. Um yeah, Sedge and I have spent lots of time testing those features we've added to Wagtail. But there is, you know, testing with our demo sites and then there is the contacts with the real world. The real world of how people set up cocktail sites in all sorts of different ways. So what we're looking at here is um our statistics

3:22

Speaker 1: on how many people out there test the biggest candidates. So by version keep tabs of how many times three candidates are downloaded and basically the more the merrier um Sometimes we make lots of a push and lots of people try it out and sometimes we make less of a push and fewer do. Yeah this is super helpful for us to get that kind of feedback before the final release Have I shared this with you, Sage, before?

3:52

Speaker 2: I don't think so.

3:55

Speaker 1: Okay.

3:56

Speaker 2: The numbers, T-Bo, what do they mean?

4:01

Speaker 1: Uh So yeah, I guess when I say when I say buy version, so this is the numbers of download between the time at which we've released our you know pre-release version. and the time of the actual release so basically this state for work test six dot four that would be um when we put the release candidate number one and that date will be early February when Wagtail 6. 4 actually goes live for people. And then like everything after is just trying to quantify how that's how you know release candidates downloads compare with um normal white downloads. Like for example, if we had 1000

4:47

Speaker 1: RC downloads and only 10,000 people use Wagtail. That's a big number, 1000 RC downloads. Whereas if we have 100,000 people testing Wachtel and we still get 1000 downloads that's a bit less. Um anyway, there's no right or wrong number It's just fun to track to see how successful we are at encouraging people to try it out basically. And um yeah, let's take the plunge. Um I thought I would demo this on wactil. org. I've just opened it in my IDE. Um How do we get going? I guess I can uh get my dev set up and running and hope for the best.

5:34

Speaker 2: Maybe you want you want to make sure that it's on the latest main branch?

5:38

Speaker 1: Probably. No module named Django, that's a good start. Okay, I have not set it up in a while. Let's do this Docker setup so I don't have to check exactly how I might or might not have set up this project in the past. People who might not have used Docker yet, I'm looking around to check what's the best command to get the project up and running. I'm sure it's well documented in the README, but I like to have a peek at the configuration to see for myself.

6:24

Speaker 1: Alright. And port 8000 Okay, so I probably will also need To log into the container and to run server? Do you like Docker Sage?

6:50

Speaker 2: Um sometimes. It gets it can get complicated sometimes.

6:58

Speaker 1: It can get complicated.

6:59

Speaker 2: It does help sometimes.

7:09

Speaker 1: Oh might have to reset this account. Okay, there's quite a bit more needed to do, but we should be able to get there. Um the

7:22

Speaker 2: eight cache table.

7:24

Speaker 1: Yeah, I'm surprised that um Oh I can never remember which of the commands are

7:34

Speaker 2: no underscore

7:36

Speaker 1: underscore separated or not. Is

7:40

Speaker 2: is there any command that is I think the official ones from Django don't have an underscore.

7:49

Speaker 1: None of them

7:52

Speaker 2: I can't recall any of them. Yeah.

7:59

Speaker 1: Oh true, yeah. That's the rule

8:01

Speaker 2: then.

8:12

Speaker 1: Look, this is my our user workflow. K refresh.

8:17

Speaker 2: You can't see you refreshing hard enough.

8:23

Speaker 1: Um why do we have static files not loading? That's interesting Um

8:34

Speaker 2: cache, is it? You mean

8:38

Speaker 1: browser cache?

8:39

Speaker 2: Yeah.

8:43

Speaker 1: Ooh, nice one sage.

8:46

Speaker 2: Oh, waste the cache.

8:49

Speaker 1: I'm surprised not to have my media files working either, but it could be that I deleted the files. um at some point in the past to save space on my computer. And I think that should be okay anyway as far as testing. Wactel 6. 3. 1. So we are One patch release behind the latest. I assume we don't need to play to the latest patch. I can just do pip install wactest 6. 4 and see what happens.

9:19

Speaker 2: Yeah Here shall we try the um def zero thing? Um

9:35

Speaker 1: So Wagtail greater than six dot four dev zero is what you want to try?

9:43

Speaker 2: I think so, yeah.

9:45

Speaker 1: Can you say more about it?

9:47

Speaker 2: Well, why why is there no output?

9:50

Speaker 1: It's not a good sign, is it?

9:56

Speaker 2: Oh no, now you have a file called six four times zero equals actually.

10:08

Speaker 1: I assume there is sorry.

10:12

Speaker 2: Yeah, sorry. That was like redirecting the standard output. But yeah, the dot uh version dev zero is uh one of the valid spear specifiers. So this allows you to just use whatever the I guess the version newer than 6. 4, including three releases. So if in the future we put out a new RC release, like RC2. That 'll install RC2 instead of RC1.

10:49

Speaker 1: Yeah, we do quite often. Actually, I have some stats on that.

10:52

Speaker 2: Yeah.

10:55

Speaker 1: Number of RCs. Wow, it's been a while that we've not had RC2. Last time well we had one in May Well, actually a year ago technically. Um

11:09

Speaker 2: RC one was a mistake and it was immediately followed up by RC2, so it it doesn't really count, I'd say.

11:16

Speaker 1: Oh no That's why. So actually it's been since um wow two and a half years ago now that we've not had multiple RCs. Yeah, we used to do that way more way more.

11:30

Speaker 2: Yeah, because I think 3. 0 and 4. 0 was like the big jump to the UI.

11:37

Speaker 1: Yes. Is this Wagtail's Python free thing or

11:43

Speaker 2: you can say that.

11:45

Speaker 1: Oh, we definitely didn't go all the way there. Uh okay, we are on the latest and greatest stage.

11:55

Speaker 2: Well, no, unless you install from main

12:03

Speaker 1: That'll be for another day. Okay. And I assume that I um will still need to Who can I remember the uh manage the PY commands to change passwords? Is it that? What?

12:24

Speaker 2: I think you need to Yeah, provide the user.

12:41

Speaker 1: I was not expecting that. Maybe I just didn't read um error message or maybe our error message is just uh the kind that doesn't tell you if um the account doesn't exist What's your go-to password sage for your local dev setup?

13:01

Speaker 2: Change me.

13:02

Speaker 1: Change me. Do you know where change me comes from?

13:08

Speaker 2: Um, I feel like I saw it somewhere. But I'm not sure. Where does it come from?

13:16

Speaker 1: I don't know either. I'd just be very interested interested to know why uh at least for Wagtail, all of our demo sites, like local development demo sites, the admin password is always changed me. It is just so ironic and tasty to know that. Okay, we are in.

13:39

Speaker 2: Wow.

13:39

Speaker 1: And it is Wagtail 6. 4 RC1. And Woohoo! We have our page that tells us what has changed. So at least that works. That's great. And in the sidebar I have my notification that we have a new release. Thank you Sage for creating that capability

14:04

Speaker 2: Well, it's been years.

14:07

Speaker 1: I still love it. You know it's so easy when you're walking on a site with lots of people. for the person to that does the upgrades not to necessarily know who to tell that the upgrade has happened and now even if um they didn't know or someone wasn't around like they were on holidays and s or something. At least when they log in the CMS, they know that things have changed and they have a sense of why. Okay, um well I guess when I do when I try a new version of what they like this as part of a site upgrade, I'd probably spend time trying out some of the site's features. to see that they still work with the new version. Like exploratory testing

14:53

Speaker 1: with you know some sense of what the site's custom features are. But for today we could probably look at the release notes and See top to bottom how to test them since it's a risk candidate we probably want to try the specific features that are in there, no? Um and the first one is background tasks. That's quite a cool one. Have you um spent time looking into this before, Sage?

15:21

Speaker 2: Um I read Jake's RFC but um and also his enhancement proposal, but I haven't actually tried the package. But now we're forced to because it's uh

15:37

Speaker 1: it's not

15:38

Speaker 2: it's not a requirement of white tail

15:40

Speaker 1: now. Yes, that's so so cool Does he link to the RFC in there? Yeah, RFC 72. RFC 72 from 2021 from Jake, which turned into Dep 14 for Django which turned into the Django tasks package as a reference implementation and I'm not sure if he links to his pull request to Django in here, but yeah definitely at some point this would be directly in Django itself. But for now we get to try the package. And I have not ever used it myself, so I think we'll just have to trust the documentation of the package to know what to test.

16:31

Speaker 1: My understanding is that by default it's using this thing called immediate backend, which means that nothing 's actually running in the background. It just works the same as before in the current thread And uh yeah, we have a few other backend options. Uh I assume eventually there'll be like you know, task Q backends, but for now we have a database one. Let's try database backend and see what happens.

16:57

Speaker 2: Yep.

16:59

Speaker 1: Okay. So in the release notes for Wagtail we have a note of which features will work differently. Search index, creating entries for the reference index. Image focal points. Wow, that's quite cool. I didn't realize. Um Maybe we can look at the reference index and the search index. Um have you worked on the reference index yourself, Sage?

17:28

Speaker 2: Um not directly, so Yeah, I've used it in different places, but I was not very involved in the implementation of the index itself.

17:43

Speaker 1: I haven't either and I'm very glad that there are clever uh people out there that do this. Um I didn't know there were two like Wacted update index and update index. I wonder if it's just some backwards compatibility thing.

18:01

Speaker 2: No, it's to avoid clash with different package that uses the same command. I think there's another package that has update index command.

18:13

Speaker 1: I'm glad I've never had to think about uh namespace clashing for management commands before. Um so it looks like the um index updating works the same as before. with uh Django Tasks installed and um the references indexed you want to talk to us about what it's for Sage

18:37

Speaker 2: Um yeah, it's for tracking the use of model instances inside fields that may not necessarily be foreign keys but it also includes um tracking references through foreign keys but in white tail we also have things like stream field which is um Semi -structured data that uses JSON. Semi

19:03

Speaker 1: -structured Oh that's so funny. I wonder like if there is someone that that's made the chart of the the spectrum of data structuredness from like literally a blob of Nothing to I don't know what's the most structured you could get. What happens in the

19:30

Speaker 2: pretty structured?

19:31

Speaker 1: What's pretty structured?

19:32

Speaker 2: SQL.

19:34

Speaker 1: SQL Yeah, but you know, even these days, cool cool kids SQL like there is Jason Fields.

19:42

Speaker 2: Oh no

19:47

Speaker 1: Um I'm just setting up multiple terminals so I can um run those commands without quitting the server. We do we go there again. Um Yeah, I think feel like in my mind it's pretty structured to be honest. Like obviously, you know, we don't um necessarily intend people to query this data super easily, but there is a schema that makes the reference index feasible to start with.

20:15

Speaker 2: Yep.

20:17

Speaker 1: Um Okay, so let's switch over to the different task backend and hope for the best. requires Django tasks that backends. database adding to installed apps. That's interesting.

21:02

Speaker 2: Yeah, you might have to run migrations after that.

21:10

Speaker 1: Take a peach Migrations is another thing and I'm so happy clever people have figured out and they made it a part of the framework. Because um yeah I don't wanna reinvent that. Ooh typing. Jake, oh my gosh. Are we adding types to Django now?

21:50

Speaker 2: Very brave.

21:56

Speaker 1: I am um Giving a talk at FOSDEM. Not this weekend but the one after. And the topic is uh existential threats to Django. One of the threats will be making a decision on typing. Cause I feel like these days lots of people um rightly or not expect it from there. Um frameworks

22:25

Speaker 2: yeah because in some cases it also helps with well not in some cases in a lot of cases it helps with IDE as well as you write your

22:33

Speaker 1: code

22:35

Speaker 2: It's very helpful.

22:37

Speaker 1: Yeah, just that 's string non, even for the most basic of stuff. Like it's just not having to keep in your head like whether the dot gets method here what it defaults to Well obviously you know you still have to trust but ver but verify but

22:57

Speaker 2: yeah

22:57

Speaker 1: saves time okay um we are officially running the database backend according to this I Thought there might be some migrations showing up here. Oh, I forgot to add the installed apps line. Did you see Sage um Simon Willison 's uh Django plugins.

23:19

Speaker 2: I did, yeah.

23:21

Speaker 1: What do you think of it?

23:23

Speaker 2: Very magical. But also um well I can't imagine it being big at this point um because Django is very mature But

23:39

Speaker 1: if

23:39

Speaker 2: it were something that Django came up with in the very beginning, I can see it being like the way to install Django plugins.

23:53

Speaker 1: Yeah, that's a good point. That's another of my threats on the for my talk is uh like just uh You know, Django, I think lots of people would say one of its strengths is the package ecosystem. But it is non-trivial when you start to combine lots of different packages to make sure they all work together. Um and you know, make sure they all work together like that's both on the package maintainers, but also helping users. um configure and customize the packages is is quite quite tricky. Um Okay, um I feel like we should be up and running.

24:39

Speaker 1: Um nothing has just disappeared, so Update references index, hope for the best. YOLO I could use completion, but Is there a way to empty it altogether?

25:14

Speaker 2: I think it started out by emptying it out.

25:19

Speaker 1: Ah, okay.

25:21

Speaker 2: But you can technically delete all instances of the reference index model.

25:30

Speaker 1: Yeah. Well it all seems to be working. I think if I wanted to double check I might also I've never used this command, so there's a fair chance it's just me not using it right. Um if we had more time I might also look at um um database management tool to see what's happening in there. But for now I think we can just trust Jake to have done it right. And um See if there's anything else to test. Yeah, okay, so this would also be all be if we wanted to um

26:21

Speaker 1: Hmm. To spend more time in there. Ah, that's what I was missing. So why does it still walk then?

27:06

Speaker 1: I was a bit surprised it was so magical So maybe the output here is the same, but the actual indexing hasn't happened.

27:25

Speaker 2: We're not exactly sure which part of the rebuild command makes use of the tasks.

27:58

Speaker 1: Maybe. Maybe I'm thinking of this wrong. And what's actually happening is the command is already, you know, quite friendly towards background workers. So maybe we've not actually updated the command. We've just updated the rebuilding of the index when you actually make changes in the CMS.

28:16

Speaker 2: I think that's what happens. Yeah. I I I'm currently looking at the code. Yeah, it looks like if you rebuild the whole index, that's still not using because it doesn't really make sense to

28:28

Speaker 1: defer it to another command.

28:30

Speaker 2: Yeah It's for um taking something out of the uh what's normally in the request response cycle.

28:41

Speaker 1: Yeah. So I think the way we could test this is um to add a reference or do a page publication that would update the search search index, see it's not happened, and then um Then see the changes later.

28:58

Speaker 2: Yeah.

28:59

Speaker 1: Let's give it a quick go. I feel like I might be um a bit out of my depth with this. It might be better for switch to other features, but We can try. So for example, if I change the page title here, I would assume it would have to be reflected in the search index. Um published in twenty twenty five, let's keep it simple. And um I think from what I recall when you hit publish here, you get the a setting in Wagtail to decide, like a

29:46

Speaker 1: Django setting to decide if you want the such index to be resided automatically or for that to be deferred. So I assume that with the Django Task syllabus backend that would not be picked up by this db worker. But there might be more configuration needed.

30:14

Speaker 2: I'm not sure if it's supposed to have any output there.

30:18

Speaker 1: Yeah. All right. We'll just trust Jake on this one and switch over to the next one over. and get back to testing this more once we've um had more time to get up to speed with um Django Tasks API Ooh, preview for Streamfield Blocks, Sage. How exciting.

30:41

Speaker 2: What is that?

30:45

Speaker 1: Well, I mean I could show you a screenshot, but we have Sage himself who implemented the feature. Tell us more, Sage.

30:57

Speaker 2: What is a stream field block?

31:00

Speaker 1: You know you say that, but I realized until today that we actually didn't use the word stream field ever in our user guide for a while. CMS users?

31:10

Speaker 2: Is that intentional?

31:12

Speaker 1: I do not know. We do use it in marketing material for the CMS, but I think it's one of those terms that um You know, if you've never used heard of it before, you don't just don't know. So in the interface, at least within the CMS, it is very intentional that it never says stream field. It just talks about blocks. Because that's a you know more agnostic term. Yeah in the docs I think I'd prefer to keep it two two blocks as well but now and then it can be helpful to um use more idiosyncratic terminology. Yeah, that's what I drafted it here with.

31:54

Speaker 2: Okay.

31:55

Speaker 1: Um Yeah, let's uh let's try it out. So Sage you've not written documentation yet for this?

32:06

Speaker 2: Um I have. But very briefly I intend to update it during the RC release.

32:13

Speaker 1: That's great.

32:14

Speaker 2: Yeah. So this is the brief documentation on how to configure it. But I guess before we do that, um maybe we should look into the current state of the lock picker.

32:28

Speaker 1: Sure. So we're going to go. Let's go back to the same blog page. It's using Streamfield quite a bit. Headless survey. So we have our standalone CTA block. Within the stream fields with quite a few other options. Um And I guess I can pick any of the options. I can type something. And I'll see the results on the preview off to the side here.

33:14

Speaker 1: Why do we need a block preview, Sage?

33:18

Speaker 2: Well, if you look at the options we have for the blocks, maybe like um what does a teaser CTA plug look like

33:31

Speaker 1: well like a diamond obviously because it has a diamond right there Sage Yeah, I've I've been I'm a dev so I've been you know subjecting myself to this UI for quite a while and like already looking at this It looks like none of the none of the fields are required, but I can see off to the side here that there are validation errors So you know that some of these it's filling in and then it's uh it's a test of okay which fields might I need to

34:10

Speaker 2: Why does it not have the asterisk?

34:13

Speaker 1: Well yeah um I think there is a bug in Streamfield specifically for that. Or it could just be that you know it's conditional validation where it expects one of the three and

34:22

Speaker 2: you don't really have a good um

34:24

Speaker 1: yeah the language in a UI isn't so good for dependent

34:29

Speaker 2: edition

34:30

Speaker 1: like this.

34:30

Speaker 2: Yeah if you clear it and then you save it then it tells you but before that um There's because it's also not very friendly to just shoot a r an error message right away.

34:44

Speaker 1: True. Yeah, they need some kind of help text that says feel one or the other.

34:52

Speaker 2: Yeah, and that's already possible if the developer added an a help text for the block, right? True.

35:00

Speaker 1: Yeah. It's one of those features that I think has been there for quite a while, but people don't necessarily realize and maybe also they copy paste their block definition from project to project and don't Forget to forget to check if the new capabilities might be there. Okay, so that's um that's a page teaser. Um I wonder if I should add at least one test image to the site so it's a bit more meaningful.

35:42

Speaker 2: That's sad.

35:45

Speaker 1: I know, it's just me that has a broken dev setup. Um then we do

35:59

Speaker 2: Yeah, because it's quite a lot of files. The whiteel. org website has been around since for as long as WhiteDel existed, right? So it's got a lot of media files if we were to pull it all to your local machine.

36:18

Speaker 1: Yep. Now we're in business. Okay, so I was able to tell what the block looks like. And now we can try the block preview?

36:36

Speaker 2: Yeah. So yeah, uh yes uh uh the the reason why there is This new thing called block previews is as you just noticed we had to actually try to insert the block and then fill out the data to see what it's going to look like. Which if you are an editor and your developer has set up different types of blocks and you're currently writing your content, it can get in the way in so in in it in terms of like you may not know which block to e to choose like um if you don't remember the exact block because there's different types of blocks and it's going to be It would have been very useful if you could know what the block looks like before you choose it.

37:27

Speaker 2: And that's the thing that we're going to add to Wiketail.

37:34

Speaker 1: Indeed. And in real-world websites, this is a real-world website, but I I certainly think there are sites out there that have even more blocks than this because you don't necessarily want to have too many page types so it's quite natural to instead ramp up the numbers of blocks so you have more flexibility and then there might be Yeah, twice that amount is is no problem

37:59

Speaker 2: really.

38:01

Speaker 1: And then you know within those block types maybe there is some nesting even and it gets even trickier to know what's what Okay, let's see if your docs are good, Sage. Shown inside the block picker. To enable this feature, you must configure the preview value and templates. Yes. Description greats I like that. Let's do description first So here you have it on the struct block directly as a query parameter and then you have it in the meta class of the block.

38:42

Speaker 2: Yeah, so you can do it in different ways. Just adapt to what your currently code uh your current code is like.

38:54

Speaker 1: I can already, you know, again, like with the maintainer's perspective, hear someone in my mind asking Oh, can I change this based on the current user?

39:04

Speaker 2: Okay.

39:05

Speaker 1: Which of those methods take the request object, Sage? Just tell us.

39:09

Speaker 2: Context. You can find the request in the context.

39:15

Speaker 1: It's funny how often that comes up. I don't know if it's funny or if I should see a bigger pattern here. Let's see if we can find the blogs. So we are in the blog area of the site. And um yeah okay so we have block. py but in this case it all inherits from um story block that is shared across other areas of the site So we'll head there. Okay, quite a few block types coming straight from Wacktail And um a few coming from a separate blocks file specific to the project. We were looking at teaser block, right?

39:59

Speaker 2: Yep.

40:02

Speaker 1: So we have all of the fields, we can see the custom validation. Definitely something that we want to streamline someday, being able to select from different types of Um types of links. Is this where you would set up the block help text as well?

40:27

Speaker 2: I don't think I'm not sure if struct block has helped that. It's usually in the field blocks. Like a charter block or um Yeah, U of L block or something.

40:46

Speaker 1: Um yeah, so help text I think it's interesting nuanced there. I don't know if it's supposed to either or not, or just for that check. The point I guess is to help people feel the form description. The point is to help people understand. What even the head is the teaser block to start with? So I guess we could describe either the visuals or the intended use, um, or both. So maybe I could say something about uh featuring an existing page um with um full width Um

41:33

Speaker 2: is it a card or

41:35

Speaker 1: is a content and image And maybe we could describe also here which page types it's been built for specifically. You know, it could be that it's reused across lots of the sites now and then, but has been built primarily for this or that type of content. Is that the right length? Do you think it would be better if it had more?

42:13

Speaker 2: It wouldn't hurt to have more, but that's also already a good description.

42:18

Speaker 1: Mm-hmm. Oh, so I do need to have the preview set up for description to appear.

42:27

Speaker 2: Yeah.

42:28

Speaker 1: So I'll do that next. So preview underscore value. Oh, that's a chunky one for us to get started with

42:40

Speaker 2: I guess we can use a custom URL instead uh just to ease things up

42:51

Speaker 1: Yeah.

42:52

Speaker 2: Because otherwise if you need a page, you're going to need to make a database query.

42:59

Speaker 1: So then I would do that inside the get context rather than oh no inside get preview value.

43:04

Speaker 2: Yes.

43:12

Speaker 1: Let's see if um

43:15

Speaker 2: no, I haven't tested this. What's gonna happen What is this?

43:28

Speaker 1: I was not expecting that either. Oh, okay, that might just have been me.

43:36

Speaker 2: Um you also need to set up a review template.

43:41

Speaker 1: Ooh. So Sage, you've added a few options to do that. And I think your personal go-to would be the The global template?

43:52

Speaker 2: Yeah, because you likely already have a custom template for your blocks.

43:58

Speaker 1: Yep. Uh teaser. Yeah, it's a block. We even have some test data for it for it already. Tea's a book, tea the block. Hmm, oh CTA.

44:26

Speaker 2: No. It's right above that.

44:30

Speaker 1: Oh, thank you. Too many options. I got blind. Oh, teaser block preview is failing. See, that's why it's better for it to be directly in Wachtel. Then there is no need to use YAML for the configuration. Uh but at least here I can I could reuse the exact same thing as there for consistency. Or you know we could iframe that preview if we preferred. But I think for us.

45:02

Speaker 2: Just to clarify that template, uh sorry, the pattern library is not related to what we were talking about in Whitel.

45:10

Speaker 1: No Should it be?

45:13

Speaker 2: Mm, that's a good question

45:23

Speaker 1: Is that enough, Sage?

45:25

Speaker 2: Um well ideally you should extend from the built-in template because that's going to be like the actual page used for the iframe.

45:38

Speaker 1: So I have it in do I have it in the right folder

45:44

Speaker 2: I mean yeah if you don't want to set up the right path you can uh for now you can set a specific template just for that block. But not the others.

45:58

Speaker 1: It's not the right path.

46:01

Speaker 2: It is. Um, I think it is.

46:05

Speaker 1: I'm surprised it doesn't just show up here, even with my CD templates.

46:13

Speaker 2: Oh, wait. Um what's the order of the uh

46:22

Speaker 1: yes

46:23

Speaker 2: installed apps?

46:25

Speaker 1: I do not know.

46:27

Speaker 2: And or have you reloaded the server? Because you might need to for for the template loader to pick the new directory.

46:39

Speaker 1: Ah good point. Always forget about this. I wonder if there's a technical reason why um It's not autodetecting templates outside um the loader being reloaded. Ooh. Look at that sage. We even have a few other blocks that just have it walking just like that.

47:10

Speaker 2: Wow. What do they look like? I wonder.

47:19

Speaker 1: Oh

47:20

Speaker 2: hello

47:25

Speaker 1: hello

47:26

Speaker 2: everything is just hello

47:31

Speaker 1: See, that's why I really like that um Matthew started work for the next phase of work there on on default validation. To me, like I really like to go incremental and do the least amount of work to get some feedback from the technology that things are set up and then I can invest time actually making sure that it's used correctly

47:53

Speaker 2: Yeah.

47:53

Speaker 1: Um okay. And thankfully Sage has just provided the template to copy. My styles. css. Um, let's see, how do we do it elsewhere? I guess we want to look at our base site template and make sure that we're going similar enough, right?

48:22

Speaker 2: Yep. Oh, manifest.

48:28

Speaker 1: I don't know. Apparently. This this irks me. The quotes are

48:36

Speaker 2: Yeah, it doesn't Yeah, that's good.

48:42

Speaker 1: And uh JavaScript, do we need JavaScript for our block?

48:50

Speaker 2: Maybe not

48:55

Speaker 1: Oh, see the quotes are right here.

49:01

Speaker 2: Yeah, if you don't need it, you can omit the job script. But I guess just to be safe, we can add it for now.

49:12

Speaker 1: Yeah. That's the kind of thing I'd like to omit, but uh it might also cause pain further on the line. Um okay it's easier.

49:24

Speaker 2: Hello.

49:25

Speaker 1: Ooh.

49:27

Speaker 2: Oh I guess it's the review values.

49:32

Speaker 1: Test, test, test.

49:34

Speaker 2: Yeah.

49:36

Speaker 1: Expected and block are manifest of course. Do you know where manifest comes from, Sage?

49:45

Speaker 2: I don't. I don't think I've heard of it. I thought

49:50

Speaker 1: I will be honest. I don't recall why this is set up like that on this project. Oh, it's using the manifest webpack loader, that's

50:02

Speaker 2: that's why.

50:04

Speaker 1: NC stuff.

50:13

Speaker 2: Okay, yeah. By the way, you might not need to reload the page because it's in an iFrame.

50:34

Speaker 1: Oh yes, that's true. Looks age.

50:38

Speaker 2: Wow, what is that? Why is it like that? Why is it just test?

50:43

Speaker 1: What were you expecting?

50:45

Speaker 2: Well, where's the I don't know the blue thing?

50:52

Speaker 1: I'm guessing this is um That's a lot of tests And the blue thing is indeed missing. I'm gonna guess that's simply enough this block's styles depend on more than what we have in the template at the moment. So we might need um

51:21

Speaker 2: oh um it might need the the bug fix that I added in my PR

51:29

Speaker 1: Which one?

51:31

Speaker 2: I think the div wrapper that has the block dash um block name CSS class.

51:45

Speaker 1: I don't know. Um

51:48

Speaker 2: or you know, you can always um open it in a U tab.

52:18

Speaker 1: Maybe it's something with the screen width that got in the way. So certainly here.

52:24

Speaker 2: What if you open the iframe in a U tab?

52:27

Speaker 1: Oh, the iframe.

52:28

Speaker 2: Yeah.

52:30

Speaker 1: So block, block, block, block.

52:41

Speaker 2: Their block preview, yep.

52:53

Speaker 1: Okay, we need a different block ID then. So that's definitely a feature that is promising but takes quite a bit of um of work to adopt, right?

53:06

Speaker 2: Yep Is it one two seven?

53:11

Speaker 1: One, two, three, probably is the first one that I do.

53:15

Speaker 2: I was thinking of looking at the iframe directly and just look at the SRC type, the attribute.

53:23

Speaker 1: What do you mean?

53:24

Speaker 2: Um when you open the block picker. Ah, there it is. Uh that

53:38

Speaker 1: 's just a screen with thing. Um why does it show twice, Sage? What have I done wrong?

53:49

Speaker 2: What does your block premium template look like?

53:59

Speaker 1: What does your block producer take look like?

54:02

Speaker 2: Oh maybe because you provided both um was it both the page and the URL?

54:14

Speaker 1: That is um an option. Let's make it a bit more real. Um teaser content that's so cool. This is such

54:52

Speaker 2: Yeah, that's very good copywriting TV.

55:00

Speaker 1: Thank you. Hey. Yeah. Um I like that Do you think it's possible for me to use get preview value then and just like you said about images fetching them from the database, would would I be able to um Scour through my whacktail content and find an instance of it like a real one and use that.

55:26

Speaker 2: Yeah, we can do that right now

55:29

Speaker 1: I feel like it's a bit beyond me, but I'd just like to know if it's possible.

55:33

Speaker 2: It is definitely possible. Um yeah, I just so it's sort of providing preview value in your meta class, you can override the get preview value method in the block class. And then you can do your, you know, Django query against the image model, for example, and get, for example, get a random image or like the last image uploaded, maybe

56:00

Speaker 1: Oh yeah, yeah. And that's the docs you were hoping to add, right? Like those methods

56:06

Speaker 2: that you use. Yeah, and I I'm still not sure where that docs should leave because I don't think we have um like the reference API for stream fields um road link. So yeah. Yes, some of the like documentation for other methods like get template for example they currently live in this very page just a few lines above I think if you look for get template Yeah. So it tells you how to use it and how to override it, but there's no like the reference

56:54

Speaker 2: section for that method itself. And I'm not sure what to do.

57:02

Speaker 1: So why would there be a reason why you can't add it to the block reference?

57:08

Speaker 2: No reason. I was thinking of adding it there. Um, but yeah, currently the get template itself doesn't have Like ideally I'd like it to be like side by side or like next to each other.

57:22

Speaker 1: Yeah.

57:22

Speaker 2: So maybe I should add that as well.

57:27

Speaker 1: I would guess that in the reference it's good to cover as many things as possible and ideally have it be automated when it's an option so you don't have to um think too hard of what to cover or not to cover and then in a how to you can be more intentional about the order in which you cover things so that people are more likely to pick up the patterns that you think work well

57:52

Speaker 2: Yeah, I guess um the problem is if you do it automatically uh people might assume that everything is included in the deprecation policy.

58:05

Speaker 1: Hmm. Yeah, okay.

58:08

Speaker 2: So yeah. Usually we do a combination of both. So we automatically generate the documentation based on the signatures and any doc strings, but we still select what methods we want to document manually. So that we don't accidentally document private methods.

58:30

Speaker 1: Got it. Okay. Let's try one more feature. It definitely takes time to try with these candidates. I think I'm really appreciative of people who take the time to do that because it's uh super helpful to us. But I guess, yeah. I guess there's the benefit that then you know you have a better sense of what it will take you to upgrade as well, maybe. Um so yes, streamfield blocks we've covered headless documentation is documentation changes that are super helpful, but Hopefully won't break anything. It's just more docs. Thank you, Saiva and Alex.

59:16

Speaker 1: Um text improvements. That'll take quite a bit of time to check out. So let's try the shorthand.

59:24

Speaker 2: Yeah, that that'll be quick and simple.

59:30

Speaker 1: This is really cool. I have no idea how long Matthew has been working on this and like whether it came from specific discussions or no, but feels like such a win to reduce the syntax a bit.

59:43

Speaker 2: Yeah.

59:46

Speaker 1: So I think what we want to do here is compare our page editing form before and after switching to this shorthand syntax.

59:57

Speaker 2: Well nothing will change, but uh the code will.

1:00:02

Speaker 1: Yep. So that would be um oh yeah, here for example. That'd be neater. Um and we were looking at the blog page. And yeah, so the Oh wow, so many of those fields we could simplify. Interesting to know how he's handled if you don't use this class defaults headings and labels. Let's convert it all, shall we, and see side by side what's happened. No. Yes. Chuck.

1:00:48

Speaker 1: So we said side by side. So I think I can um put another browser window on the same page

1:00:59

Speaker 2: I don't know if Chrome has it, but Microsoft Edge has a split view.

1:01:05

Speaker 1: Split view? Yeah.

1:01:06

Speaker 2: It's very cool.

1:01:09

Speaker 1: Moving over right now. Do you use Microsoft Sage?

1:01:15

Speaker 2: Uh yeah, sometimes. Um not at work for some reason. I think uh just because for my personal stuff I have it synchronized.

1:01:28

Speaker 1: Makes sense? Uh how do you use the split view sage teachers?

1:01:36

Speaker 2: I think if you click on the I'm not sure what that is that the one? Yeah.

1:01:47

Speaker 1: What Wow. Let me take a moment to adjust my screen sharing so we can make the most of this. Okay. So Let's say left will be before and then right will be after. So I assume I can refresh that one without the other refreshing. Yeah, and then we can make the changes and see what happens. Um boom boom boom boom boom boom.

1:02:34

Speaker 2: Look at this ten times engineer.

1:02:44

Speaker 1: Yeah, that's what they do with their Vim mic macros, right?

1:02:49

Speaker 2: You have Vim bindings?

1:02:52

Speaker 1: Honestly, like I've considered picking them up a few times, but um I don't know, I just couldn't um say

1:03:01

Speaker 2: it

1:03:01

Speaker 1: 's to me like ye yeah there are more important things to see my score than typing. I don't know Sage on a daily basis. Do you spend more time writing or typing?

1:03:14

Speaker 2: I spent more time thinking, I think.

1:03:17

Speaker 1: That's a good point. Did it just work? Is it what just happened?

1:03:25

Speaker 2: Did anything change?

1:03:27

Speaker 1: Oh yeah, looks look look at that.

1:03:33

Speaker 2: Oh

1:03:34

Speaker 1: block page related page one. Block page related page two That's a lot of related

1:03:49

Speaker 2: and you can now actually click on it. It's not disabled the add button.

1:03:55

Speaker 1: Yes, because we removed the

1:03:57

Speaker 2: Yeah, yeah. So that changed.

1:04:04

Speaker 1: Well that's really cool. Um yeah, I I think for inline panel uh Uh I feel like quite often you might want to customize the label still.

1:04:16

Speaker 2: Yep.

1:04:18

Speaker 1: But uh the defaults are pretty decent. And so it's called block page related page, I assume because It derives from from that?

1:04:34

Speaker 2: Um there might be uh

1:04:37

Speaker 1: Oh no, hang on, I'm looking at the wrong. Yes. That's why. That makes more sense. So I guess yeah, you could just pick a better class name here if you wanted to trust those defaults. Um yeah, or optimize the UI by using the longhand syntax. Cool. Um Drag and drop, Sage?

1:05:07

Speaker 2: Oh, who worked on that?

1:05:11

Speaker 1: Who worked on that

1:05:17

Speaker 2: Oh, what is that?

1:05:22

Speaker 1: Boom.

1:05:23

Speaker 2: Oh

1:05:26

Speaker 1: Um drag and drop, yeah, that's that warrants its own videos, the coolest. I'll just give leave that that teaser. Search terms report. Do we use the search terms on this website?

1:05:44

Speaker 2: Let's find out.

1:05:46

Speaker 1: Ah, we do

1:05:48

Speaker 2: headless. It's a favorite.

1:05:53

Speaker 1: That's a good one. We do have a page about the headless, but I would assume that it is relatively hard to spots it might not be like in our main menus or anything. That's a really useful feature. I'm really happy we landed this one. And that's um we have it in the release notes. Performance optimizations or stage. You've done lots of this And then there's a plethora. Thanks to your

1:06:31

Speaker 2: audit.

1:06:32

Speaker 1: Yeah. Well there's more to do. There's a plethora of other features which will be worth testing, but not today. I think we've done good today, Sage. Some things work. Some things need improvements.

1:06:50

Speaker 2: Definitely.

1:06:52

Speaker 1: We'll get there.

1:06:53

Speaker 2: Yeah

1:06:57

Speaker 1: That was fun. I hope it encourages a few more people to test our candidates and have fun with us. Maybe we'll do a live version of this at some point. Just go through this with people together.

1:07:08

Speaker 2: Well, that would be fun, yeah.

1:07:11

Speaker 1: I'll think of a date and make it happen. And um yeah, Wachtel 6. 4 due to be released. Let's look at Sage's master calendar.

1:07:23

Speaker 2: Master calendar.

1:07:26

Speaker 1: It is so cool, Sage. I wanna I wanna I want to look at it every day if I can.

1:07:31

Speaker 2: This bunch of bunch of bunch of numbers. It's in the White Tele organization now. Not sure if I linked it here. I think the yeah this uh the one I linked here is still on my account, but if you just um scroll up to the projects tab at the top on GitHub What were you doing? Just scrolling down the discussion. Yeah.

1:08:19

Speaker 1: So we are here in red. And six dot four is due Monday. Not not Not next week, Monday, but the one after. So there's like what ten days left to test it? Do you think we're on schedule to ship on time?

1:08:39

Speaker 2: I think so. Well, unless. Unless. That's why we need your help.

1:08:48

Speaker 1: Yeah, most definitely.

1:08:50

Speaker 2: Yeah.

1:08:52

Speaker 1: Let's do some testing with Django 5. 2 as well. So we see quite important. I don't know if you've seen my message about this, but I assume that since Wagtail 6. 4 is released before Django, we won't formally commit to supporting it, but we probably still will be supporting it anyway.

1:09:11

Speaker 2: Yeah, we'll probably say that it's it has provisional support for it because currently our tests are passing with the uh Django 5. 2 branch So we expect any breaking changes in Django would be treated as regressions and therefore also release blockers. for the 5. 2 release. So by the time the final release of Django 5. 2 is out, it shouldn't have any of those regressions anymore. Ideally. Which is usually what happens. So yeah.

1:09:55

Speaker 1: Maybe we'll add support in the patch release like we done before, considering um There probably won't be any code changes.

1:10:04

Speaker 2: Yeah, and yeah, there there's currently nothing stopping you from installing Django 5. 2 by the time white till 6. 4 comes up because the requirements um yeah we we have the upper boundary for Django set to 6. 0 currently, which we're hoping to remove at some point in the future.

1:10:27

Speaker 1: Are we?

1:10:29

Speaker 2: I think so.

1:10:30

Speaker 1: Aw. I liked the upper boundary.

1:10:38

Speaker 2: Yeah, but

1:10:42

Speaker 1: It's okay, I'll let it go. Let it go. Ooh, look at that I know what I'm doing next after this meeting, say

1:10:54

Speaker 2: you should drop the Django's upper boundary on Django Pattern Library. Why does it mean to have it?

1:11:02

Speaker 1: Because otherwise it just breaks without people noticing.

1:11:07

Speaker 2: Well.

1:11:09

Speaker 1: But yes, it would be neat if it just worked with every future version Django ever

1:11:14

Speaker 2: Which is historically what happens, right? I mean , uh Has there been many changes in Django that broke, yeah?

1:11:25

Speaker 1: Um I think like Three or four to be honest. If I if I screen shared again um this Right here is exactly the type of thing that I wish we didn't ship um the package with. So this is Django introducing a warning when uh a template tag is registered multiple times. Which is um fundamental aspect of how the binary works at the moment. Um

1:11:58

Speaker 2: I was wondering what that what that was about. Yeah.

1:12:02

Speaker 1: Now you know. So I don't know which version of Django introduced that or which configuration changed, but yeah, that's exactly the type of compatibility issue that You know, even if for the sake of the argument, even if there was no code change to do in a library, I think I'd at least want a document in the Really said introduced his support for that version of Django.

1:12:25

Speaker 2: Yeah.

1:12:25

Speaker 1: Oh, now you'll be a warning. Anyway, we'll get there. Thank you, Sage. It was fun.

1:12:33

Speaker 2: Yeah, thank you, Tibor, for actually doing all the testing. I'm just telling you what to do.

1:12:39

Speaker 1: Programming is good.

1:12:41

Speaker 2: Yeah, it is good

1:12:42

Speaker 1: Talk to you soon.

1:12:44

Speaker 2: Alright. See you.

Questions this talk answers

Why should I test Wagtail release candidates before the final release?

Release-candidate testing exposes compatibility problems across the many different ways real-world sites are configured, beyond what the project’s demo sites can cover. Download numbers help the maintainers measure how widely each candidate is being tested and gather feedback before release.

Discussed at 3:22

How do I install the latest Wagtail 6.4 release candidate, including future RCs?

Using a requirement such as `Wagtail > 6.4.dev0` installs a version newer than 6.4, including pre-releases. If a later candidate such as RC2 is published, the same specifier can select it instead of RC1.

Discussed at 10:12

What is Wagtail’s reference index used for?

It tracks references to model instances inside fields that are not necessarily ordinary foreign keys. In particular, it supports references embedded in structures such as StreamField’s semi-structured JSON data, while also tracking foreign-key references.

Discussed at 18:37

What are Wagtail block previews and why use them?

Block previews show editors what a StreamField block looks like before they insert and populate it. This is especially useful on sites with many block types or nested blocks, where choosing the right block can otherwise be difficult.

Discussed at 36:36

How do I configure previews for Wagtail StreamField blocks?

Configure a preview value and a preview template, either through the block’s metadata or by overriding methods such as `get_preview_value`; the preview can also have a description. The preview template can be a global built-in template or a block-specific template.

Discussed at 38:01

Can a Wagtail block preview use real data from the database?

Yes. Override `get_preview_value` in the block class and run a Django query there—for example, to select an image or another content object to use in the preview.

Discussed at 55:33

What does Wagtail’s new shorthand syntax change?

It shortens the Python definitions for fields and related panels while relying on sensible default labels and settings. The resulting editor UI remains largely the same, although removing explicit options can also change behavior such as whether an add button is enabled.

Discussed at 59:57

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos by Sage Abdullah and Thibaud Colas

More videos from Wagtail CMS