Nice Test case (as all your others about HTMX..)
I am however still struggling with the HTMX-JavaScript necessary (?) combination.
You mention the following :
"The reason being HTMX is dealing with server-rendered html and we don't need any JavaScript on the client side to make this work."
I guess this means that you can not really bypass JavaScript as soon as you work inside a web-framework (flask for me). So if, for example, a date is needed from an HTML input tag, for further python processing, you would still require some heavy JavaScript lifting to possibly customize a date picker and make the web data accessible to python.
Customizing a date picker and using htmx are two different things in my opinion. If you want to send the date value to your server, you can still do it via htmx. I think understanding the strengths and limits of htmx is a great starting point. htmx.org/essays/hypermedia-driven-...
Thank you for your answer. I totally agree with you that they are two different things. I am an exclusive Flask-Python person and furthermore very allergic to JavaScript. So I am always looking for ways to totally avoid JS-which of course is doomed to fail-.
At present I use a JS piece of code which listens to the date input ,converts the web variable to a python variable (json..) and launches a flask route to set the python variable as global. This in turn allows a possible hx-put to the web page in a separate flask route.
All in ..an extremely cumbersome process- I will take pleasure in reading the reference you provided.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice Test case (as all your others about HTMX..)
I am however still struggling with the HTMX-JavaScript necessary (?) combination.
You mention the following :
"The reason being HTMX is dealing with server-rendered html and we don't need any JavaScript on the client side to make this work."
I guess this means that you can not really bypass JavaScript as soon as you work inside a web-framework (flask for me). So if, for example, a date is needed from an HTML input tag, for further python processing, you would still require some heavy JavaScript lifting to possibly customize a date picker and make the web data accessible to python.
Customizing a date picker and using htmx are two different things in my opinion. If you want to send the date value to your server, you can still do it via htmx. I think understanding the strengths and limits of htmx is a great starting point.
htmx.org/essays/hypermedia-driven-...
Thank you for your answer. I totally agree with you that they are two different things. I am an exclusive Flask-Python person and furthermore very allergic to JavaScript. So I am always looking for ways to totally avoid JS-which of course is doomed to fail-.
At present I use a JS piece of code which listens to the date input ,converts the web variable to a python variable (json..) and launches a flask route to set the python variable as global. This in turn allows a possible hx-put to the web page in a separate flask route.
All in ..an extremely cumbersome process- I will take pleasure in reading the reference you provided.