clean-vegetable-65167
07/15/2021, 2:08 PMsalmon-xylophone-28580
07/15/2021, 3:32 PMclean-vegetable-65167
07/15/2021, 3:33 PMbored-napkin-20287
07/16/2021, 6:22 AMelegant-london-97728
07/16/2021, 7:14 AMsalmon-xylophone-28580
07/16/2021, 8:43 AMastonishing-fish-5228
07/19/2021, 10:05 PMuser
07/19/2021, 10:16 PMastonishing-fish-5228
07/19/2021, 10:18 PMsalmon-xylophone-28580
07/20/2021, 7:17 AMblue-manchester-57655
07/21/2021, 12:27 AMDjango Views — The Right Way
(https://spookylukey.github.io/django-views-the-right-way/), I stick with FBVs for the most part, and have refactored several CBVs to FBV as well. In the end, I find them much more usable and explicit. There's less thought involved when reading my FBV code later. I don't have to ask questions about whether a method is overriding another, the order of logic flow, etc.blue-manchester-57655
07/21/2021, 12:30 AMuser
07/21/2021, 5:27 PMswift-arm-37963
07/22/2021, 5:51 AM<form
method="post"
action="{% url 'requests:attachment-delete' object.uuid attachment.uuid %}"
hx-confirm="Are you sure?"
hx-target="closest div"
hx-swap="outerHTML"
>
{% csrf_token %}
<button type="submit" class="btn-close" aria-label="Close"></button>
</form>
but it does not do anything at the moment.swift-arm-37963
07/22/2021, 5:56 AM@transaction.atomic
def delete(self, request, *args, **kwargs):
self.object = self.get_object()
self.object.delete()
messages.add_message(self.request, messages.SUCCESS, 'Successfully deleted request!')
return HttpResponse(status=204)
swift-arm-37963
07/22/2021, 5:56 AMuser
07/22/2021, 10:51 AM<div>
instead of the 204
response.mysterious-toddler-20573
07/22/2021, 1:33 PMmysterious-toddler-20573
07/22/2021, 1:33 PMmysterious-toddler-20573
07/22/2021, 1:33 PMplain-kangaroo-26043
07/22/2021, 7:24 PMsalmon-xylophone-28580
07/23/2021, 7:05 AMnpm install
. Now I have the libraries which I want (for example htmx.min.js) and can use them via staticfile+whitenoise.
Up to now I have no build step. Or is there a useful feature which I miss, if I don't use esbuild?cold-morning-35868
07/23/2021, 9:33 AMplain-kangaroo-26043
07/23/2021, 6:32 PMvictorious-room-74725
07/30/2021, 4:48 PMincalculable-scientist-18707
07/31/2021, 3:51 PMvictorious-room-74725
07/31/2021, 3:53 PMincalculable-scientist-18707
07/31/2021, 3:59 PMmysterious-toddler-20573
07/31/2021, 4:04 PMmysterious-toddler-20573
07/31/2021, 4:04 PMhx-post
directly on one of the buttons and include a value w/ hx-vals
as a fall back