Closed yelluw closed 3 years ago
Hi
Because the classes are so small, I'm very hesitant to add them, and maintain them. I intend the library to mostly consist of low level tools for working with htmx - much like htmx itself is mostly low level primitives. It's not clear to me that partial rendering is even that useful as a technique, since one can use hx-select.
On top of that I'm not a big fan of class based views, I think they're normally a poor trade off. At least the class hierarchy in Django itself is too complicated. To this end I maintain Django-vanilla-views. But that's another rant.
Anyway, to conclude, at this time, I'm not that interested in adding a couple of short view classes, and particularly maintaining them. I think the partial rendering example is enough for users to get started with and build upon.
Thanks for the idea though.
Ok I understand :)
Wasn't aware of Django-vanilla-views. Thanks for the friendly discussion!
No worries, any time. Good luck using htmx.
Hello,
I'm using the project and have identified some (IMO) nice additions around mixins and views.
HtmxTemplateResponseMixin
based onTemplateResponseMixin
. This allows people to pass ahtmx_template_name
value in class based views.https://github.com/Tiny-Tiny-App/django-htmx/blob/htmx-views-and-mixins/src/django_htmx/mixins.py
HtmxFormView
that implements theHtmxTemplateResponseMixin
. This allows people to define a template to be used as the return value.https://github.com/Tiny-Tiny-App/django-htmx/blob/htmx-views-and-mixins/src/django_htmx/views.py
Are these additions that fall in line with the project goals?
I'm in the process of writing tests but dont have a clear idea of how y'all are setting up the testing infrastructure.
Could you be so kind and add information to the readme (well here as well) about how to run and add tests to this repo?