# Wishlist granted: HTMX without betraying your Django views with Natalia Bidart

Source: https://djangotv.com/videos/djangocon-us/2026/wishlist-granted-htmx-without-betraying-your-django-views-with-natalia-bidart/
Date: 2026-10-26
Speakers: Speaker 1, Speaker 2, Speaker 3, Speaker 4
Text: lightly edited for readability (verbatim on the page)

## Transcript

**Speaker 1:** [00:14] Okay, thank you, everyone. Good afternoon. As Koja said, this is Wishlist Granted: HTMX Without Betraying Your Django Views. This is a talk that a lot of people have been saying, “Oh, I’m looking forward to your talk,” so I’m a little bit nervous about weird—or not weird, but difficult—HTML questions. So, the first disclaimer: I am not an HTML expert at all. I’ve just used, like, three things that work all the time. It’s a perfect recipe, but we’ll try to answer the questions that arise. Okay, so, a small intro. This is me, Natalia Bidart, Django Fellow. I’m also known as Nessita.

[00:59] Since forever. I’m a part-time Django Fellow. That means that I work around 20 hours a week for the DSF. And I’m also a part-time contractor for REVSYS, which is a Django consultancy agency. In general, I’ve always been doing backend work. So when someone says CSS or JavaScript or fancy things in the browser, I’m a little bit like, no, I like to be a little bit back. JavaScript and I have always kept a very polite distance. I don’t bother it, and JavaScript doesn’t bother me. But at some point there was a change for that, for the work that I was doing for the contracting

[01:45] agency for REVSYS. So how is this talk organized? We have three sections. One is this intro. I’m going to talk a little bit about the motivation and how I ended up doing the work that I did and why I decided to share it with you at this conference. Then we’re going to try to be a little bit more hands-on. I will share what I call a recipe, a recipe that worked for me and for the project. And then I’m going to show a little bit—sorry—for the recipe, we’re going to use a simplified version of a wishlist feature. And then at the end I’m going to share a little bit of closing remarks, including showing the actual site that uses this wishlist feature that we built with REVSYS.

[02:33] So, what is the context for this? While doing this contract work, I’ve been with the same client for around three years already. And about a year ago, there was a new issue assigned to me. The project I was working with is a Django marketplace for aircraft parts. That’s something that is amazing, because you have this site where you can find big wheels, wings, and special oil for aircraft. So I have also learned a lot about aircraft, and it’s very challenging because there are a lot of parts for a lot of different kinds of aircraft.

[03:18] One of the things that wanted to be added is, during the flow where you would be browsing the different parts for aircraft, the goal is to have the user be able to store something, or create a wishlist, or store a given product in a wishlist. The idea is to do that in a way that a customer will not leave the product page, because that’s important in a marketplace. We are trying to sell things, which is the main thing for a marketplace. You don’t want the user to leave a product page and potentially never go back to actually complete the purchase. So in order to do that,

[04:04] I received a spec from a dedicated UI/UX company describing how it should look, how the different flows should look, how you are on a product page and should stay and log in if you are not logged in, and be able to create a wishlist. The design itself had a lot of elements that were very new to me, very strange in a way, because these weren’t like the traditional, “You have a URL, you go to a page, you do something, you submit a form, and then you end up on another page and continue to do that.” The design was always on the same product page. You have to interact with a lot of different logic. But

[04:49] that design also required a specific component to be built that wasn’t available. So the first part of this project was a joy for me because, since this fancy component wasn’t available, I could just start with everything backend, the traditional Django views. I could do all the full-page renders, I could have confirmation pages for delete operations—everything as I knew it so far. So that was very entertaining. I designed the models, I designed the different views for creating wishlists, deleting, adding items to them, and a few other things. But as I was saying, there was a catch to that. I always knew that at some point I would have to

[05:37] transform this very bread-and-butter Django into something that would be much fancier. I had no idea how that would work. I was only focused on building robust code, correct code, fully tested. I tried all the flows in the browser. And that was a way also to show progress to the client that was paying for this work. But at some point Jacob, who is their teammate, said, “This super-complex element is ready, so you need to integrate what you have done, which is completely server-side, into this fancy thing,” which was

[06:23] really a modal, like you would have these fancy pop-ups on the product page, and you would be able to do things with it. So this is when I started asking questions: How do I integrate with that? How can I grab the things that I already built, which was a time investment and money investment? I don’t want to throw all that away. So I had the core pieces: the models, the views, and the business logic. But I didn’t want to just throw everything away. I wanted to try to have both ends meet in a healthy place. So how did I do it? Well, how I ended up in this was a little bit organic, with a lot of help from my teammates and a lot of reading.

[07:10] At the time—this was a year ago—LLMs weren’t that popular or that available. So I did it all without an LLM. Looking back then, I was fighting a lot with a lot of things. And I think it’s worth mentioning at this time. So we’re going to see the recipe. For the recipe, we’re going to have a few ingredients, and I’m going to talk about them. But before that, there is a small recording of this baseline that I built, which is a very simple wishlist site. This is in GitHub; this is some code that I will share. But basically, this recording is showing what I built. This is the recording where there is no

[07:55] HTMX involved at all. So you can see you have the different operations to create a wishlist, to rename a wishlist, to delete it, to add items to it. And I’m not sure if you see in the navbar, there is a pony and a timestamp. That pony and that timestamp will change every time there is a full-page render. That thing will sort of update the timestamp to the current time, and also the pony will say hi. So this is, as I will show the different parts of the talk and the different recipe, we’ll start using a little bit of HTMX. And then we will start seeing how that navbar doesn’t refresh anymore because we will be replacing parts of the template

[08:43] with fragments and not reloading the whole thing. So let’s go see the ingredients. As I said, there are three. One is template partials. Karen talked about this this morning in the keynote, about how great they are. These are really fantastic. I mean, you have a way to define a section of your template, put a name to it, potentially render it as you define it, and then you can use it in a lot of ways. Particularly, you can use render, like in your view, you can just use render and the usual syntax where you define which template to render, but you can use the hash, the partial name syntax, to just render that.

[09:30] small part of the template. You can also, in a template itself, use a partial name, and that will, in that place, grab whatever partial is called partial name and render it there. The other option for how to use partials is just like the classical include tag. You can just define the template name with the hash and the partial name. And that will also let you include different parts of a template in other templates. This is an example from the code that is in the repo. You will have the wishlist detail page, and in that case, within a div,

[10:16] there is a definition for the part of the template that renders the details of a wishlist. The other ingredient is HTMX. HTMX, as you see there, the first thing is a quote from the HTMX site itself. It says it’s a library that allows you to access modern browser features directly from HTML rather than using JavaScript. For me, this is so appealing because JavaScript and I don’t interact. So this is giving me the option to do things with JavaScript without actually having to use it. So that for me is so exciting, using the word from Karen. At some point in my previous

[11:01] job there was this need to make the frontend more dynamic, more interactive, were the words. So all of a sudden, all your views in Django, you have to transfer everything to use JSON. You need to use JSON endpoints and provide information. You needed to redo the validation that you had from the forms to be done in a big JavaScript framework. With HTMX, sorry, the server still returns HTML. So you don’t need to migrate to different endpoints, APIs with JSON results. Your views keep returning HTML. And for me that is fantastic, because you have your traditional template. You might add some

[11:46] specific attributes, which are the perfect HX attributes that will then indicate to the browser how to operate and what to do with those. So basically, from the point of view of the developer, you never leave traditional Django views and the traditional templates, which are HTML, in your responses. This is an example. This is also the wishlist detail page. This is inside the div that I showed before. It’s a form where you can create a wishlist from there. I will show an example. So this is the site running on my machine, and for creating a new wishlist,

[12:32] you have what I’m showing here, which is the traditional form as we know it. We will post the form data to the add URL. But also, if we add the HX-Post, it’s very difficult for me to say “HX something.” My tongue always gets entangled with it. But we have HX-Post, HX-Target, and HX-Swap. So there are three things from HTMX that will make that form behave a little bit differently. So how, particularly? Well, HX-Post, or GET, are the verbs that, when that form is submitted, are going to execute—in this case, a POST. HX-Target means that

[13:19] whatever you get as a response from the view, from the add URL view, will be swapped into whatever HTML element has the ID wishlist itself, which is the one that I showed you a few slides before. And there is another thing. These are the three things that I use and nothing else, right? The HX-Swap, which indicates, once you’ve located that element with a given ID, whether the replacement happens at the div level in this case or inside the div. The default is for the replacement to happen inside the element that is identified with the ID, which is innerHTML. Generally, in my case, I’ve found myself always having to define outerHTML.

[14:06] Because I'm usually returning the fragment that contains the div itself. Also, every time you trigger an action via HTMX, the request itself—the request that reaches the Django view—will have some specific check headers, particularly the HX-Request header will be set to true. So that's a way to directly know whether you are getting an HTMX request or not. There are other headers involved, but we are not going to focus on those. The other amazing ingredient is the glue that has Django meeting HTMX. This is something that Karen mentioned. Django HTMX is a package that provides a minimal abstraction layer between these headers that I mentioned, the HX requests, and what we use in Django.

[14:57] Views. It basically, via a middleware, will have every request have an HTMX attribute available: request.htmx. And it's actually an instance of HTMXDetails, where you can ask things of it. Django HTMX will also provide a few more helpers that we will see, which are very handy. I'm just putting the names there, but we will see how to use it later. Okay, so now I'm going to show a few diffs in the next section. I just wanted to say that I intentionally crafted all the code in the templates and in the views in a way that the diffs will be minimal. That's intentional for educational purposes. Sometimes the diffs are not that clean. But if we do a good job in how our HTML is indented...

[15:44] ...and how our views are defined, we will get very small diffs. So what do we need to do? We need to grab HTMX and have it available. Particularly, what I usually do is grab a vendor copy of HTMX and just put it as a script, which is the line that you see there. But there is also a config thingy that is put there that is worth mentioning, because by default, HTMX 1 and 2, which are the current versions, will have—if you define an apparent element, HX elements like the swap or the target—those will be automatically inherited by the children of those elements. So sometimes you get unexpected behavior for things that have been inherited.

[16:33] With that line, the inheritance is disabled, so every time that you want a given behavior in an HTML element, you will have to define all the HX attributes explicitly. This is also something that the HTMX creator himself says: the biggest mistake made in HTMX 1 and 2 was making attribute inheritance implicit. They say that they took the inspiration from CSS. But they are now releasing an HTMX 4 version where the default is going to be not inheriting the attributes. Well, then of course we need to add Django HTMX to the requirements file, and we need to add...

[17:20] Django HTMX to the installed apps, and add the crucial middleware that is the one that will allow us to check the HTMX variable on any request inside a view. So all the secret sauce is just in a view: you use this—is this an HTMX one? If yes, you take a decision; if no, you do something else, right? So that's basically the secret to all of this. But then the rest, everything that you have—all your form validations, all your saving instances, and different business logic—does not need to change at all.

[18:10] So let's talk a little bit about one example, the first example, which is what I call the first swap. This is in the wishlist list template, which is the home page. This is the homepage. So as you can see, when I click in the navbar, the pony says hi because it's fully reloading the whole page. But when I go and see the details of this wishlist, the pony didn't say hi. And this is using—sorry, this is using this code that we see there. In the link that is saying, okay, if you click here, you will see the wishlist detail from the wishlist page. We have a traditional href...

[18:56] For the link, so if JavaScript is not enabled, that just works. You have the right URL. But if JavaScript is enabled, an HX-GET is going to be triggered, which is a GET request to your Django server, and it's saying what part of the template, which is like the content section, will be replaced and with which strategy. In particular, the base template, how I have it, has a main content area, so I'm going to swap the whole thing because the detail information for a wishlist uses the whole content area. And there is a subtitle there, which is HX-Push-URL, which is set to true because when you click on something, even if we do this magic HTML thingy, we do want the URL to change.

[19:43] We don't want, if we were in our app and you click on a specific wishlist, the URL to not reflect that, because of the back button or because if you do an F5 or reload the page, you want the user to be on the same page they were on. Then what happened? So we said, in an element, we now have the ability to issue a GET that will go to a given URL. So what happened? The response will be swapped in the content, but what is the response? How do I do that? Well, particularly here I'm showing class-based views. This is what the project uses, but this is also...

[20:29] Implementable with traditional function-based views. For class-based views, how many people are familiar with class-based views? Okay, almost all of you. Great. So for the different class-based views, you have a given set of views that provide some abstraction of functionality for deleting things, for seeing details of things, for listing a collection of things, and all of them have something in common, which is the method get_template_name. That method is used when the whole view ends up rendering a response to return to the request. You say which template is to be used for that request.

[21:15] In this case, I'm highlighting there the only two lines that need to change in whatever class-based view you already had, in this case the wishlist detail, when you want to just return a fragment. The template name will presumably be defined in your view; otherwise Django has the default for them. And the only thing that I had to do is, okay, so just in order to be able to click on a wishlist link and get just the swap for the part of the wishlist detail, I just need to say, okay, if this is an HTMX request, just return the partial that we defined a little bit sooner. This is particularly how the partial is defined. The whole detail, leaving aside all the footer, all the header, is defined in that way, and that's the thing that the response is returning for an HTMX request.

[22:07] So let's see another example. This is, as I showed before, how to add a URL. This is the same. We can do a POST from a form, and we set which target is going to be changed. Oh, sorry, this is not to add a wishlist. This is to add an item to a wishlist. So we are on the wishlist detail page where you have all the items that are already in your wishlist. But you have a form there. So here I'm in a wishlist with no items in it, so I can add things to it. And as you can see, the navbar didn't reload, the pony didn't say hi. I'm going to add another one.

[22:52] This is the form that I'm showing here. We have a form to add an item to the wishlist where we're saying, okay, so when the form is submitted, we're going to go to the add URL, and whatever response you get back, we're going to replace the wishlist detail, which is the whole thing. This is basically because we need to reload the list, right? If we added something and didn't reload the whole thing, we wouldn't see the new item added to the list of products. The other super interesting thing is that, as you can see in a wishlist detail, you have some delete buttons. Well, they're not buttons, they're actually links. If JavaScript is disabled, if you click on them, you will go to a full new page with a confirmation...

[23:39] Form. And you might submit it, and then your wishlist or your items get deleted. These are really links. And you know, traditionally with HTML, it's not like you can post from a link. But HTMX allows you to do that. As you can see, we can define the HX attributes as we saw: the POST, target, swap. There are two more. And from an A, from a link, we can initiate a POST to a view. Particularly here, there is a confirm page—a confirm prompt, sorry—you know, where if I do this delete, I will get this confirmed automatically. And also, in order for the POST to be successfully processed by the Django...

[24:26] View, as you know, we need to send the cross-site request forgery token. When you have a form, you put the tag in there, and that is just sent. In this case, we don't have a form and we don't have the tag, so we need to send explicitly the value of the token, which is in the context in the template, to the view so it can process the POST successfully. So now we're at the part where we saw how we have triggers from HTMX. We did one where we just need to return a fragment. We saw how we return the fragment using get_template_name, and then we saw how the fragment that we return has HTML with HX...

[25:12] Attributes in it, and they trigger other actions to the view. Particularly, we issue a GET first, but then we issue a POST. How do we handle the POST on the view side? This is the class-based view to create an item in a wishlist. And the only lines that I'm adding there is, you know, when we have a wishlist and we add a new product. Oh, there we go. As I say, we need to rely on this part, but also we need to process the POST itself. So, on form_valid, which is the method in class...

[25:59] ...that is used to actually process when the form is valid and you want to actually generate the side effect for your action. Traditionally, when you post something to a view, you most likely get redirected back, because that's the traditional flow. For HTMX, we don't want a redirect back. We still want to do the swap in place. So for that, there are different ways. This is the simplest way, which is basically saying, okay, you have a form valid, you save, you actually store the instance, but you don't want to redirect the user back. What you want is to redisplay the same thing that the wishlist detail will show, so that part, that fragment, when the request is HTMX, can be shown in the UI.

[26:45] So for delete, this is very similar. I also show that you can have a POST from a link to delete. You process the form values as usual, and if the request is HTMX, you do not do a redirect back to where you started. You just render the part that needs to be shown in the template. So this is a little bit of a demo. This is something also that I showed in the live browser. I did some recording so we wouldn't have potential problems with the demos. And we can continue going on and on with the different operations that you can do on a wishlist. The pattern for creating a wishlist.

[27:31] Right now we saw a pattern for adding an item to a wishlist and removing an item from a wishlist. There are the other actions, you know, creating a wishlist and deleting a wishlist as a whole, where we will follow just the same patterns. We will have the different views, and we will redefine template names, and we will add a few lines to get_template_name. We will add a few lines to form_valid, and that's just it. It's just the recipe. So there is also a demo and how you can pay attention to the navbar. The pony doesn't say hi because we just create and delete wishlists, and those use HTMX and there is no full page reload. So...

[28:17] I was planning to show this live, disable JavaScript, and show you how the ponies start popping all the time for every operation, but I think I'm a little bit behind in time, so you can grab the repo and try it yourself. You just disable JavaScript, and that will just work as it was before. So that was so important to me because I didn't waste any line of code already written. I didn't change—I didn't have to do things completely differently or branch completely differently to achieve what I needed to do. For me, that's very mind-blowing. The small exception here is when you are deleting a wish list from the wish list page itself. It's not like you can swap anything because you are deleting what you're seeing.

[29:03] So there is nothing to swap onto to actually render that, because the wish list is gone. So for those cases, the server is still returning a redirect as before. So there is another interesting case that I will go briefly over, which is renaming. In the site, you can rename a wish list, and as you can see with the full solution, there is a way I'm replacing an element with a form, and on submission I'm still on the same page without any full reload, and I'm actually doing the rename. So for that, in the same detail, I define another partial. You can have as many partials as you want in a template.

[29:50] Where, when you show the title, it's basically this part. You have the title showing, and you have a link for rename. Then you have the wish list update, which is the view doing that. In that case, the view will return, as you can see, an HX-Get. So when going to the update view, I'm going to return a form that is the one being swapped in place. And that partial is what you see there. The wish list update view will return that partial that will be replaced in the title part, and you will have a full form where you can issue posts.

[30:36] You can also have a link to cancel. There is another thing that I wanted to share with you, which is that HTMX has something called events, which are so handy. This is an example of—I'm not sure if you see in the navbar, there is now a summary to your left, right? When you operate with a wish list, it changes. How many wish lists do you have? How many items do you have? And as you can see, that's in the navbar, which is very far away, let's say, from the sections of the HTML that we've been swapping in order to refresh the amount of items that you have and whatnot.

[31:23] So how can you, when you trigger an action from a subsection of your template, have side effects in another part of the template? Well, there is this thing, which I call events. You just define events, and you attach an event to a response. In this case, this was what we showed before: when you are in a form and a side effect actually happens, not only am I returning the template that needs to be rendered, but I'm also saying, "Okay, this response is carrying a new event, which is called wishlist change." How is that used? In your HTML, you can say with HX-Trigger, "Okay, this is the span that I'm showing. I added it to the navbar."

[32:09] So you can say, on load, particularly, it will do an HX-Get to the wish list summary endpoint, which is a very minimal summary. I will show it right away. But also, if there is a wishlist change event occurring anywhere in the body, it should get again. The view providing that is minimal; it's a function-based view. It doesn't even return HTML. It only returns the count of the wishes and the count of the items. Because, as I show you here, remember that the swap occurs immediately and inside the same element

[32:54] with inner HTML as a default. So whatever we're returning, which is just text, is going to be shown inside the span element. So the events are also very nice because, as I was saying before, there's this a little bit tricky thing where, when you're processing side effects and your form is valid, you sort of need—you cannot redirect the user anymore to another page. Well, you don't want to; you can't, but presumably you don't want to. So instead of re-rendering the section that you want to get updated, you may choose to attach

[33:39] events to your side effects so the parts of the templates refresh themselves. So you don't build exactly what you want HTMX to swap, but you just instruct it to refresh itself with a specific URL. That's very nice because the view code ends up being a little bit simpler, and for me it's a little bit easier to reason about. But one of the not-so-great things is that you end up issuing more requests from your page. You may have multiple requests in order to bring different parts of the page and refresh them. Okay, so I'm going to be very brief. There is one thing—sorry, I'm showing in the recording that you may have different tabs

[34:27] and you may be operating in one tab, and then, of course, your views will have the login required decorator. But what happens if you go into another tab and you get logged out because, for whatever reason, the session expires, and then you go back to your original tab where you still had the wish list operations open and you try to execute something? I'm not sure if you see there, but I'm basically getting the whole login page swapped into the part of the template where I was hoping to see just the real thing, not a full login page. That's why that occurred: because login required will return a traditional 302.

[35:13] You know, when you're not logged in, you will have a 302 to the login page. How can we solve that? Well, this is where the HTTP response client redirect class, which is provided by Django HTMX, helps us. Basically, when you return the response, it will instruct the client to do a client redirect, not a full redirect. So my first solution for this was to specialize the login required mixin and say, "Oh, sure, if you need to redirect to login and you're in HTMX, just build the same URL as you were doing before and return an HTTP response client redirect." This is a very nice solution, but it requires that all your views

[35:59] are all of a sudden swapped or migrated to use the specialized mix in, right? And you may have third party abuse from third party apps or you may have the admin views or function based views that you forgot to migrate and you will still have the same problem that if you say if the session expire for any reason the user will get swapped a full login page. So an ICER solution is to Perhaps build a middleware where every redirect that you have needs to return if you are in the context of an HTML request. you can just always return HTTP response client redirect. In that way you ensure that no matter what views you have, what

[36:45] Okay, so to close this, the real site where we work on this is McFarlane Aviation.com. You can go and check it out. I've got a small recording here in case the network fails me. These are the wish lists. In order to operate with the wish list as a whole, there are dedicated pages. But when you go and grab a product, you're able to, as you can see, use the wish list icon. You're able to have this modal, which was built by someone who knows how to do them, Jacob, not me. And I just

[37:31] graft my views, and with an HX-Get request, the modal will say, "Okay, so there is this small fragment, and I need to populate it with different forms or things for the user to operate." So these are small things that will have HTMX attributes, and they will go to the traditional views that I built, and they will bring forms to add items to a list, create new lists, or delete things from a list, as shown there. In particular, this site will allow you to operate with wish lists even if you're not logged in, and when you try to operate with a wish list, you will get prompted to log in without leaving the product page, which I think is very

[38:18] clever from the designer's point of view, right? I wouldn't come up with that. Okay, so to finish it up, in five minutes: this is where I talk about loyalty, you know, not betraying your Django views. I basically didn't have to redo my views; I didn't have to throw away the work that I did. I just had to be mindful of where to handle the HTMX part of the request and, well, of course, some specific things about how to integrate it with the dedicated modal component that was built. But it was really amazing. I thought it was a new way for me to make peace with JavaScript.

[39:03] The other nice thing is that whenever your forms have errors, you don't need to do anything special, because you will still be returning the part of the template that has your form, and that will already have all the errors in there. It will reuse whatever style you had. So it's very, very handy. A slide showing a little bit of the trade-offs: the redirects are something that you need to handle explicitly, as I said, and in every place that you can have a redirect, you need to be a little bit smart about what you return. Then all your views will have some branches depending on the request's HTMX attribute.

[39:48] When you want to post from something that is not a form, you need to do some manual handling of the CSRF tokens so that the post is actually successful. And, of course, if you want to, you need to pay attention to which URL you want the user to end up at. So you might need to use HX-Push-URL for it. HTMX has other niceties, HX-Boost, which is something that I still can't wrap my head around yet. But you should definitely check out the documentation; it's very helpful, and it's so easy to use. So there is that URL that has the code. I need to open it up now after the call. Thank you to Repsys for hiring me, and Dan

[40:33] from McFarlane Aviation for letting me present around what I did with them, and the organizers. I'm deeply thankful for HTMX and Tailwind existing, because that really changed my reluctance to work with CSS and JavaScript. Thank you. We might have two minutes for questions, but

**Speaker 2:** [41:03] You pointed out we've got about two minutes for questions. Anyone have a question? I will run over to you with a microphone like I'm Phil Donahue. Oh, go ahead. I need the microphone for that.

**Speaker 3:** [41:16] Okay, this question is from Maurice online. He's asking: for state management, developers sometimes use Redux. Can you make HTMX coexist with Redux?

**Speaker 1:** [41:26] Can you ask again, sorry? What do developers use?

**Speaker 3:** [41:29] Redux. They use it for maintaining state on the front end, in JavaScript land. All good.

**Speaker 1:** [41:38] Do we use that, Jacob?

**Speaker 3:** [41:40] Yeah, go for it.

**Speaker 1:** [41:41] No, no. I have no idea what that is. Sorry.

**Speaker 4:** [41:44] Thank you, Natalia. That was a great talk. I'm curious: how do you like to test the HTMX interactivity?

**Speaker 1:** [41:50] Okay, that's a good question. What I have been doing is staying with traditional tests as well, and I've been using the Django test client, sending the right headers, the HX-Request header, and asserting on the response that I get. So I haven't been doing anything outside what you would expect in the test. There is a little bit of duplication because for some things you have the non-HTMX request and the one that asks, so you might define some helpers in order to assert that the proper response is returned. For some of the bits, I found myself asserting over the HX attributes that were in a specific element in order to provide some guarantees that something is going to work the way we want.

[42:38] Then, of course, you can use Playwright and some other things for more end-to-end testing, but I have used unit tests all across the Wishlist feature.

**Speaker 4:** [42:49] Thank you.

**Speaker 2:** [42:55] And that is our time, so thank you. Another round of applause for our speaker.
