celery-progress icon indicating copy to clipboard operation
celery-progress copied to clipboard

ajax request using htmx

Open ramiboutas opened this issue 2 years ago • 1 comments

Hi Cory, thank you very much for this repo!

Do you think it is easy to integrate this with htmx? If yes, what files and methods do I have to change or achieve that? Thank you!

ramiboutas avatar Jan 25 '22 08:01 ramiboutas

You're welcome!

I do think it would be easy to do. You could base most of it off the progress bar example. Then on the backend, instead of returning JSON, you'd just want to return the relevant template fragment.

You could easily copy and modify this view, and then return something like

  <div id='progress-bar' class='progress-bar' style="background-color: #68a9ef; width: {{progress.percent}}%;">&nbsp;</div>

Let me know how it goes!

czue avatar Jan 26 '22 12:01 czue