brave-magazine-28098
01/22/2022, 7:39 AMnumerous-leather-81181
01/22/2022, 7:40 AMbrave-magazine-28098
01/22/2022, 7:41 AMbrave-magazine-28098
01/22/2022, 7:42 AMnumerous-leather-81181
01/22/2022, 7:43 AMbrave-magazine-28098
01/22/2022, 7:45 AM<form hx-get="{% url 'test' %}" ...>
numerous-leather-81181
01/22/2022, 7:45 AMnumerous-leather-81181
01/22/2022, 7:45 AMbrave-magazine-28098
01/22/2022, 7:46 AMnumerous-leather-81181
01/22/2022, 7:47 AMnumerous-leather-81181
01/22/2022, 7:48 AMnumerous-leather-81181
01/22/2022, 7:48 AMbrave-magazine-28098
01/22/2022, 7:50 AMnumerous-leather-81181
01/22/2022, 7:51 AMnumerous-leather-81181
01/22/2022, 7:51 AMnumerous-leather-81181
01/22/2022, 7:52 AMnumerous-leather-81181
01/22/2022, 7:53 AMnumerous-leather-81181
01/22/2022, 7:56 AMnumerous-leather-81181
01/22/2022, 7:56 AMnumerous-leather-81181
01/22/2022, 7:56 AMbrave-magazine-28098
01/22/2022, 7:57 AMmammoth-family-48524
01/23/2022, 10:02 AMhtmx.ajax('PATCH', url_tests_save_order, {
target: '#page-errors',
values: result, // this is a JavaScript array of objects
})
When I look at the request payload in Chromium dev tools, it looks like it htmx has taken the JavaScript object (the one I assigned to 'values' in the ajax context) and turned it into a string - or an array with a single character in each item, and submitted that as the payload. Any idea what I'm doing wrong?mammoth-family-48524
01/23/2022, 10:17 AMmammoth-family-48524
01/23/2022, 10:46 AMmammoth-family-48524
01/23/2022, 10:46 AMsalmon-xylophone-28580
01/23/2022, 2:43 PMbland-coat-6833
01/26/2022, 9:32 AMextends
statement that includes a base template when it's non-htmx and just returns the template content when it is an htmx request. (i.e. no inheritance).
I'm just wondering whether this is how it plays out in practice. e.g. are there times when you end up needing lots of other blocks in order to recreate the full page when someone refreshes.bland-coat-6833
01/26/2022, 9:34 AMplain-kangaroo-26043
01/26/2022, 12:38 PMbase.html
template for all "full page" requests with some {% if request.htmx %}
logic to determine whether to include e.g. HTML header and footer tags. But I can see that getting unwieldy in more complex applications.bland-coat-6833
01/26/2022, 12:44 PM