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

    hundreds-camera-24900

    11/18/2021, 1:44 AM
    yeah
  • h

    hundreds-camera-24900

    11/18/2021, 1:44 AM
    I'm worried there's some corner case I haven't found yet
  • h

    hundreds-camera-24900

    11/18/2021, 1:44 AM
    the merge thing in the other room for example
  • h

    hundreds-camera-24900

    11/18/2021, 1:45 AM
    the issue there is that if you submit a form or something, get back an html fragment w/ the form validation and set the message
  • h

    hundreds-camera-24900

    11/18/2021, 1:45 AM
    as I have it set up right now the message will never disappear until the user manually dismisses it
  • h

    hundreds-camera-24900

    11/18/2021, 1:45 AM
    then if they click a boosted link that will replace the entire dom INCLUDING the ul that contains the message
  • h

    hundreds-camera-24900

    11/18/2021, 1:46 AM
    but it's also possible the link they clicked produced a message
  • h

    hundreds-camera-24900

    11/18/2021, 1:46 AM
    so I want to merge the two
  • l

    limited-diamond-93357

    11/19/2021, 1:30 AM
    @hundreds-camera-24900: I'm thinking of putting in a feature request for
    django-htmx
    to add message support to the middleware. What I've written (haven't posted it yet). Thoughts? https://gist.github.com/CapnKernel/9c352d71a85fd2de44990f641ca6e8ba
  • l

    limited-diamond-93357

    11/19/2021, 1:35 AM
    @hundreds-camera-24900: I've just added your thoughts to the end of that gist. That ok with you?
  • h

    hundreds-camera-24900

    11/19/2021, 4:25 AM
    Yeah all good with me
  • h

    hundreds-camera-24900

    11/19/2021, 4:25 AM
    If there's interest I can out up a pr
  • h

    hundreds-camera-24900

    11/19/2021, 4:26 AM
    I just feel like I'm close but not 100% library level
  • l

    limited-diamond-93357

    11/19/2021, 4:37 AM
    @User: pile on πŸ˜„ https://github.com/adamchainz/django-htmx/issues/152
  • l

    limited-diamond-93357

    11/19/2021, 4:43 AM
    @hundreds-camera-24900: That is to say, do you want to add your bit, as per my gist? https://gist.github.com/CapnKernel/9c352d71a85fd2de44990f641ca6e8ba
  • l

    limited-diamond-93357

    11/19/2021, 8:18 AM
    @User if it's ok with you, I'll add your contrib to that issue if I don't hear from you in a while. Will give credit
  • l

    limited-diamond-93357

    11/19/2021, 11:22 AM
    @hundreds-camera-24900: So you're using solution 2? https://htmx.org/examples/update-other-content/
  • l

    limited-diamond-93357

    11/19/2021, 11:24 AM
    Where do you use
    no_oob
    ? https://github.com/gone/animelister/blob/master/animelister/templates/base.html#L32
  • h

    hundreds-camera-24900

    11/19/2021, 3:39 PM
    I don't, that is left over
  • h

    hundreds-camera-24900

    11/19/2021, 3:39 PM
    the no_oob flag can be tossed
  • h

    hundreds-camera-24900

    11/19/2021, 3:40 PM
    I was using it becuase I wanted the parital to render differently for the initial render vs the middleware but I realized that since oob only fires when it's a top level element it is a no op in the base.html case and can be left in to no effect
  • h

    hundreds-camera-24900

    11/19/2021, 3:40 PM
    yeah fine by me to mention it
  • h

    hundreds-camera-24900

    11/19/2021, 3:40 PM
    if @User is interested in the method and wants changes I'm happy to do those too
  • h

    hundreds-camera-24900

    11/19/2021, 3:40 PM
    otherwise I'm going to continue to stew on it and update it over time
  • h

    hundreds-camera-24900

    11/19/2021, 3:41 PM
    there's still a couple things I don't love about it (EG using _request in the callback, since that's supposed to be private)
  • l

    limited-diamond-93357

    11/20/2021, 1:45 AM
    Can you add your worth-considering thoughts to the issue please?
  • b

    bland-coat-6833

    11/21/2021, 9:39 PM
    Hello all. FastAPI has been turning my head away from Django but htmx has been turning it back. I’m rewriting an app that currently polls a URL and an wondering if I can replace that with some SSE. Is this possible in async Django these days? I’m trying to avoid Channels if I can…
  • b

    bitter-dog-98292

    11/22/2021, 4:26 PM
    Hi of course you can do anything
  • b

    bitter-dog-98292

    11/22/2021, 4:26 PM
    No need for the usual front/api
  • b

    bitter-dog-98292

    11/22/2021, 4:27 PM
    https://htmx.org/docs/#polling
1...202122...100Latest