bitter-family-65697
01/21/2022, 9:49 AM<a hx-post="{% url 'index' %}" HX-Trigger-Name="click">Click Me!<input type="hidden" name="click"></a>
and I have an error 403 in console. What i'am doing wrong?plain-kangaroo-26043
01/21/2022, 9:51 AMplain-kangaroo-26043
01/21/2022, 9:52 AMhtml
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
bland-coat-6833
01/21/2022, 9:58 AMfresh-controller-36545
01/21/2022, 10:22 AMbland-coat-6833
01/21/2022, 10:28 AMbitter-family-65697
01/21/2022, 10:28 AMbland-coat-6833
01/21/2022, 10:29 AMfresh-controller-36545
01/21/2022, 11:29 AMfresh-controller-36545
01/21/2022, 11:29 AMbitter-family-65697
01/21/2022, 11:45 AMplain-kangaroo-26043
01/21/2022, 1:12 PMcareful-room-54859
01/21/2022, 11:53 PMimportlib.reload
? I have tried to setup an example of allowing creation of dynamic apps using metadata stored in a database. I can load a dynamic app and it will render fine. If I make a change in the database, I perform an importlib.reload(<module_name>)
and I can see the new UI changes from the metadata. However, if I make another change and execute the same reload
the previous version is still shown. I am not sure why it works for the first iteration but any subsequent call doesn't seem to update....Just curious if anyone has done this?numerous-leather-81181
01/22/2022, 5:56 AMurl?color=red
, and if you changed the color filter and Submit, the URL becomes url?color=blue
. I was pretty thrilled how easy it was to use HTMX to make the select buttons work immediately, without Submit, as illustrated below. However, multiple color changes lead to a goofy URL: url?color=red&color=blue
. Is there a better approach? I tried hx-params to no avail.
<form>
<label class="label">Color</label>
<div class="control">
<div class="select">
<select name="color" hx-push-url="true" hx-target="body" hx-get="" hx-trigger="change" id="id_color">
<option value="red" selected="">Red</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
</div>
</div>
<label class="label">Shape</label>
<div class="control">
<div class="select">
<select name="shape" hx-push-url="true" hx-target="body" hx-get="" hx-trigger="change" id="id_shape">
<option value="square" selected="">Square</option>
<option value="circle">Circle</option>
<option value="triangle">Triangle</option>
</select>
</div>
</div>
</form>
brave-magazine-28098
01/22/2022, 6:42 AMhx-get=βurl?color=redβ
then that will be the URL that is pushed.numerous-leather-81181
01/22/2022, 6:46 AMurl?color=red&shape=circle
. With htmx it works but whatever you reselect gets repeated.brave-magazine-28098
01/22/2022, 7:01 AMhtml
<form hx-get="/url" hx-push-url="true" hx-swap="none" hx-trigger="change">
<select name="color" id="">
<option value="red">red</option>
<option value="blue">blue</option>
<option value="green">green</option>
</select>
<select name="shape" id="">
<option value="square">square</option>
<option value="circle">circle</option>
<option value="triangle">triangle</option>
</select>
</form>
numerous-leather-81181
01/22/2022, 7:16 AMbrave-magazine-28098
01/22/2022, 7:19 AMnumerous-leather-81181
01/22/2022, 7:19 AMnumerous-leather-81181
01/22/2022, 7:25 AMbrave-magazine-28098
01/22/2022, 7:28 AMnumerous-leather-81181
01/22/2022, 7:29 AMbrave-magazine-28098
01/22/2022, 7:36 AMhtml
<form hx-get="/test" hx-push-url="true" hx-trigger="change" hx-swap="none">
<select name="color" id="">
<option value="red">red</option>
<option value="blue">blue</option>
<option value="green">green</option>
</select>
<select name="shape" id="">
<option value="square">square</option>
<option value="circle">circle</option>
<option value="triangle">triangle</option>
</select>
<input type="text" hx-get="/test" name="search" hx-trigger="keyup delay:500ms changed" hx-include="[name='shape'],[name='color']">
</form>
numerous-leather-81181
01/22/2022, 7:36 AMbrave-magazine-28098
01/22/2022, 7:37 AMnumerous-leather-81181
01/22/2022, 7:37 AMnumerous-leather-81181
01/22/2022, 7:39 AMnumerous-leather-81181
01/22/2022, 7:39 AM