https://htmx.org logo
Join Discord
Powered by
# python-htmx
  • This _could_ be a good use case for the new `hx-on` stuff and bare triggers coming in the next version. Maybe <@725789255590215732> can cast some light on it
    b

    bland-coat-6833

    03/31/2023, 6:09 PM
    This could be a good use case for the new
    hx-on
    stuff and bare triggers coming in the next version. Maybe @mysterious-toddler-20573 can cast some light on it
  • I’m thinking that you send a “finished” event and have the hx-trigger run some js that removes the attribute.
    b

    bland-coat-6833

    03/31/2023, 6:11 PM
    I’m thinking that you send a “finished” event and have the hx-trigger run some js that removes the attribute.
  • so I can use `hx-trigger` to trigger a JS function I defined?
    t

    tall-sundown-41732

    03/31/2023, 6:12 PM
    so I can use
    hx-trigger
    to trigger a JS function I defined?
  • https://github.com/bigskysoftware/htmx/blob/dev/CHANGELOG.md#190---2023-
    b

    bland-coat-6833

    03/31/2023, 6:13 PM
    https://github.com/bigskysoftware/htmx/blob/dev/CHANGELOG.md#190---2023-
  • What if I want to do it _now_? 😆
    t

    tall-sundown-41732

    03/31/2023, 6:13 PM
    What if I want to do it now? 😆
  • Wait, `hx-trigger` specifies what will trigger the request in that element. What I want is to run some JS when the "finished" message arrives.
    t

    tall-sundown-41732

    03/31/2023, 6:14 PM
    Wait,
    hx-trigger
    specifies what will trigger the request in that element. What I want is to run some JS when the "finished" message arrives.
  • Ie the custom event coming from the server.
    b

    bland-coat-6833

    03/31/2023, 6:16 PM
    Ie the custom event coming from the server.
  • `evtSource` is going to be my element with the extension?
    t

    tall-sundown-41732

    03/31/2023, 6:17 PM
    evtSource
    is going to be my element with the extension?
  • Sorry for all the basic questions, but my HTMX knowledge is very limited.
    t

    tall-sundown-41732

    03/31/2023, 6:36 PM
    Sorry for all the basic questions, but my HTMX knowledge is very limited.
  • You are my saviour!
    t

    tall-sundown-41732

    03/31/2023, 6:50 PM
    You are my saviour!
  • I think that'll drive it home.
    t

    tall-sundown-41732

    03/31/2023, 6:51 PM
    I think that'll drive it home.
  • <@524210044796010506> I confirm that I got it to work 🥲 thanks!
    t

    tall-sundown-41732

    03/31/2023, 7:14 PM
    @bland-coat-6833 I confirm that I got it to work 🥲 thanks!
  • Just dropping this here: https://jinjax.scaletti.dev I was browsing for jinja things and it popped up. Not a recommendation but not not a recommendation either 😄
    b

    bland-coat-6833

    04/06/2023, 2:06 PM
    Just dropping this here: https://jinjax.scaletti.dev I was browsing for jinja things and it popped up. Not a recommendation but not not a recommendation either 😄
  • ah excellent. This is probably my only pain point ive discovered returning tot he flask ecosystem after by tour of JS land
    a

    abundant-dog-96915

    04/06/2023, 10:29 PM
    ah excellent. This is probably my only pain point ive discovered returning tot he flask ecosystem after by tour of JS land
  • s

    salmon-umbrella-46363

    04/17/2023, 2:03 PM
    Is there a library like bootstrap-flask that renders the HTML for me but for a lighter UI framework? I like how bootstrap-flask has the render_form() macro that renders the entire form for me
  • a

    ancient-shoe-86801

    04/21/2023, 9:53 PM
    when I don't want to think much about styling, I just write plain HTML directly and use something like pico.css
  • a

    ancient-shoe-86801

    04/21/2023, 9:54 PM
    @salmon-umbrella-46363
  • b

    bitter-machine-55943

    04/24/2023, 3:38 AM
    Pico is nice. Sometimes a little too large by default but good to get something going
  • s

    salmon-umbrella-46363

    04/24/2023, 4:29 PM
    Pico.css and plain HTML is what I ended up doing
  • a

    ancient-shoe-86801

    04/25/2023, 2:21 AM
    dropping this here: https://github.com/PyHAT-stack/awesome-python-htmx
  • b

    bland-coat-6833

    04/25/2023, 6:22 AM
    Nice! Should have a new one for that list sometime soon....
  • m

    magnificent-barista-99118

    04/25/2023, 6:37 PM
    Thanks for posting this, I created it at PyCon 2023 this year with a few others. Very open to critiques and discussion: https://github.com/PyHAT-stack/awesome-python-htmx/discussions
  • r

    ripe-hairdresser-53724

    04/27/2023, 8:14 PM
    Great work @magnificent-barista-99118 ! Create an issue - https://github.com/PyHAT-stack/awesome-python-htmx/issues/11 . Debatable topic, but gave it a try! 🙂
  • s

    strong-diamond-48451

    04/27/2023, 11:21 PM
    Were there any talks at pycon related to htmx? I attended virtually but had a crazy weekend so was in and out. You can tell I'm in your target audience since I'm here too so I'll be following the project!
  • m

    magnificent-barista-99118

    04/27/2023, 11:24 PM
    There was a tutorial, which should be going online at some point I believe? The person who gave the tutorial is one of the core contributors to awesome-python-htmx, so check back there in the next couple months to see it!
  • s

    strong-diamond-48451

    04/27/2023, 11:24 PM
    Cool, yea I was going to go back through what I missed this weekend. Think the videos are all up.
  • s

    strong-diamond-48451

    05/01/2023, 1:23 AM
    Been cooking up a python component framework to use with htmx if anyone wants to take a look. Just pushed it to github today https://github.com/redmage-labs/redmage . It's based on starlette. Still kind of an experiment/proof of concept (code is mess) and the README is missing a lot of info. Figured I had enough to get feedback or at the very least maybe spark an idea or two.
  • b

    bitter-machine-55943

    05/01/2023, 1:31 AM
    Very cool!
  • h

    happy-microphone-42295

    05/23/2023, 6:35 PM
    @htmx_org multi-swap extension, swapping multiple elements from the HTML response: constructed with django+python code in forms+views+templates #htmx #django #python https://cdn.discordapp.com/attachments/941388608290574336/1110637054620086354/VID-20230523-WA0002.mp4
  • s

    strong-diamond-48451

    05/28/2023, 10:37 PM
    Put together an example todo application using redmage components + htmx. I implemented used Jinja2 as my templating engine and organized my components in separate files. https://github.com/redmage-labs/redmage-todo-example