https://htmx.org logo
Join Discord
Powered by
# πŸ”₯-django-htmx
  • h

    hundreds-camera-24900

    02/06/2022, 4:39 PM
    I've done a lot of react/vue/stencil
  • h

    hundreds-camera-24900

    02/06/2022, 4:40 PM
    so the concepts behind them from a js point of view make sense to me
  • h

    hundreds-camera-24900

    02/06/2022, 4:40 PM
    there's just like a missing link between that and "the backend doesn't have a shadow dom" that I never really got
  • f

    fresh-controller-36545

    02/06/2022, 5:43 PM
    Can you also use it without any frontend framework?
  • h

    hundreds-camera-24900

    02/06/2022, 5:44 PM
    yeah you can - it uses web components so it's not js framework specific
  • f

    fresh-controller-36545

    02/06/2022, 5:45 PM
    Yeah I know it's in vanilla javascript – but the Frameworks section is quite prominent in the docs, so I wasn't 100% sure.
  • f

    fresh-controller-36545

    02/06/2022, 5:45 PM
    Cheers
  • h

    hundreds-camera-24900

    02/06/2022, 5:46 PM
    yeah that's so you can use it within react/vue/angular
  • h

    hundreds-camera-24900

    02/06/2022, 5:46 PM
    but you don't need to if you're server side rendering
  • m

    melodic-parrot-20305

    02/08/2022, 3:11 AM
    Hi guys, quick question. I would like to make AJAX get request in an anchor tag. When user click on the menu item lets' say blog it will call ajax request and get the data from the URL
  • m

    melodic-parrot-20305

    02/08/2022, 3:12 AM
    example : BLOGS
  • m

    melodic-parrot-20305

    02/08/2022, 3:13 AM
    I am not sure where to put hx-get=""?
  • m

    melodic-parrot-20305

    02/08/2022, 3:13 AM
    I will appreciate the help
  • s

    steep-france-23568

    02/08/2022, 4:16 AM
    As a shortcut to a solution, you could just use a instead
  • m

    melodic-parrot-20305

    02/08/2022, 12:35 PM
    I thought about but I want to stick with Anchor tag
  • m

    mysterious-toddler-20573

    02/08/2022, 2:15 PM
    You would just put the hx-get on the anchor and then, most likely, add an hx-target='body'
  • m

    mysterious-toddler-20573

    02/08/2022, 2:15 PM
    On the other hand, you could simply use hx-boost and be done w/ it: https://htmx.org/attributes/hx-boost/
  • m

    melodic-parrot-20305

    02/08/2022, 3:15 PM
    Thanks guys
  • m

    melodic-parrot-20305

    02/08/2022, 3:15 PM
    I appreciate
  • b

    bland-coat-6833

    02/08/2022, 10:53 PM
    Hello all - just a little curio that I've put together: https://lllama.github.io/dark-star/
  • b

    bland-coat-6833

    02/08/2022, 10:56 PM
    It's (yet another) "framework" using Starlette. I got thinking about Locality of Behaviour (thanks to @User ) and wondered if you could put the templates right next to the code for a view. The idea is that a fair chunk of the boilerplate is removed and replaced by putting files in the filesystem. (kinda like a webserver - old things are new again.)
  • b

    bland-coat-6833

    02/08/2022, 10:58 PM
    And that's basically it. But it does get you up and running fairly quickly. And having little pieces of HTML living at URLs is nice and easy. Seems to fit in with what we're doing here.
  • b

    bland-coat-6833

    02/08/2022, 11:01 PM
    I'm dropping it here in case anyone fancies a play and giving some feedback. If I get the chance then I'll try and put together a Real World (https://realworld-docs.netlify.app/) example - that should help to shake out any issues. Or show that the idea doesn't really work πŸ˜„
  • b

    bland-coat-6833

    02/08/2022, 11:01 PM
    Going to tag @User as this has come out of the discussion about Play v1 and similar ideas.
  • b

    brave-magazine-28098

    02/09/2022, 12:49 AM
    This is cool - it’s kind of like the .vue files that have Template and logic all in one file. I wonder if you could build components this way and pass in data that python would handle similar to vue as well.
  • b

    bland-coat-6833

    02/09/2022, 7:18 AM
    Thanks! One of the aims was getting from an html file to a working URL as quickly as possible. Jinja does have support for macros, which let you do things that look like components. I’m going to see if they can be put in their own directory and then auto-imported into templates.
  • a

    adamant-exabyte-92636

    02/09/2022, 4:16 PM
    Nice! πŸ‘πŸ‘
  • s

    shy-refrigerator-51928

    02/10/2022, 3:17 AM
    Hello, anyone have an example of a django-htmx bootstrap modal form?
  • r

    refined-waiter-90422

    02/10/2022, 4:33 PM
    @User re: darkstar. Filesystem-based routing was one of the first things I did for my own Starlette project. Really cool to see people doing this.
  • r

    refined-waiter-90422

    02/10/2022, 4:34 PM
    imho it's one of the all-time best features from PHP.
1...464748...100Latest