https://htmx.org logo
Hi Waseem, welcome! I'm not a django developer, b...
# 🔥-django-htmx
m
Hi Waseem, welcome! I'm not a django developer, but here is my take on those two questions: 1). With my htmx apps I tend to structure the URLs around the UI needs of the application, beyond the first level. So, I'll have the standard
/contacts/
,
/contacts/34
, etc, but then I'll start getting things like
/contacts/34/details
for a details div that needs to poll or whatever. A bit different than how a JSON API would work. 2) In general, the more you can move to the backend, the better. If you have a lot of small changes that need to occur in the UI, then you probably want to expand the target of your HTTP requests to be as large as possible. If that won't work, there are other techniques available: https://htmx.org/examples/update-other-content/, but I always advocate keeping it as simple as possible