Django & HTMX - django-template-partials for Template Partial Responses

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 54

  • @proofit404
    @proofit404 Год назад +9

    I can't express enough how simple it is to integrate with existing projects. Other alternatives in comparison just makes me cry.

    • @bugbytes3923
      @bugbytes3923  Год назад +2

      Yeah, it has been very nice to use for me so far.

  • @ИгорьВоевода-ъ4т
    @ИгорьВоевода-ъ4т Год назад +11

    I think this is really the best way to render partials with django-htmx. Thank you so much for all the videos you make, your tutorials make me a much more skillful developer!

    • @bugbytes3923
      @bugbytes3923  Год назад

      That's amazing to hear, thanks a lot!

  • @onnot701
    @onnot701 11 месяцев назад +2

    great video's as always. If I may give one suggestion. When working with forms + htmx + swapping it would always be nice to show how to give back a form for validation on errors, how to swap ooob and how to manage all those nity little triggers for behavior

  • @seydinaoumarsamabaly1806
    @seydinaoumarsamabaly1806 Год назад +2

    This makes htmx easier with django, mostly when rendering ! Thank you mate !

    • @bugbytes3923
      @bugbytes3923  Год назад

      Thanks for commenting mate - and yes, agreed!

  • @МаксимБалашов-м3г
    @МаксимБалашов-м3г Год назад +2

    Django+htmx is cool! Thanks for the great video!

  • @allieuslee-yq1mz
    @allieuslee-yq1mz Год назад +1

    I learn a lot about htmx thanks to you. 👍

    • @bugbytes3923
      @bugbytes3923  Год назад

      Glad to hear that, thanks for the comment!

  • @krystian-magdziarz
    @krystian-magdziarz Год назад +2

    Amazing. You always make video that i'm looking for.

  • @robhafemeister3100
    @robhafemeister3100 Год назад +2

    Awesome stuff and perfect timing once again. Much cleaner than render-block.

  • @james_anderson4
    @james_anderson4 Год назад +3

    Amazing tutorial, very easy to follow and understand how all the pieces come together. Would love to see a tutorial on setting up Django with SvelteKit and using them together.
    Keep up the amazing work!

    • @bugbytes3923
      @bugbytes3923  Год назад +3

      Thank you - I have something ready to record with SvelteKit + Django. It's a long one though, need to get it done soon and stop putting it off! :D

  • @proofit404
    @proofit404 Год назад +1

    Лучший!

  • @s0lci70
    @s0lci70 Год назад +1

    you're so so helpful!!

  • @kai.diefenbach
    @kai.diefenbach Год назад

    Very interesting approach to exchange - well - partials of a page! Well presented, thanks for this! Nice

  • @thomasdb6126
    @thomasdb6126 Год назад

    Very handy, thanks for the clear video once again

  • @codedjango
    @codedjango Год назад +1

    Thank you so much

  • @khunjohn1054
    @khunjohn1054 Год назад +3

    More beautiful tutorials. I've not used this or the other block/partial packages so this was new for me. Could you not have used the hx-on::after-request="form.reset()" have been a faster way to clear the form?

    • @bugbytes3923
      @bugbytes3923  Год назад +1

      Thank you!
      Ah -- very good idea! Missed that one when preparing the video.

  • @ale6au
    @ale6au Год назад

    Thanks one more time for the great tutorial!

  • @Panzerboy006
    @Panzerboy006 Год назад

    Thanks for the tutorial, very informative. One small thing though; the blog post is still using the afterSwap event in the script that is used to clear the form.

    • @bugbytes3923
      @bugbytes3923  Год назад

      Thank you for pointing that out! I'll get that changed.

  • @repotranstech
    @repotranstech Год назад

    Cool video as always, thanks,you taught me all I know about htmx.

  • @立法院很忙
    @立法院很忙 Год назад +1

    Nice!

  • @frameff9073
    @frameff9073 Год назад +1

    thank you

    • @bugbytes3923
      @bugbytes3923  Год назад +1

      You're welcome, thank you for watching!

  • @mario.valkovic
    @mario.valkovic Год назад

    super helpful content as always!

  • @CodeForChange
    @CodeForChange 7 месяцев назад

    Thank you so much for this video, you always have the best content, one question, for some reason i cant clear a Summernote form after positing, i tried a lot of method including the htmx one but nothing is working, any help would be appreciated

  • @hanny4697
    @hanny4697 Год назад +2

    Out of curiosity - how does this work if there are errors in the form? Does the `.reset()` method clear out what the user has entered even if there are errors?

    • @danfan4707
      @danfan4707 Год назад +1

      I came here to ask the same question! 😀 Seems to me that the reset needs to take place if the film list gets appended to (i.e., the form submission was valid).

  • @rampageshary8194
    @rampageshary8194 Год назад

    can you make a full tutorial on django channels and htmx?

  • @mrfran1
    @mrfran1 11 месяцев назад

    The button :active state stays in the same state after form.reset()… How would it look like (with AlpineJS) the form reset and the buttton normal state when form submitted?

  • @amine63404
    @amine63404 8 месяцев назад

    Hello, I have a question please, can we return more than one partial using the render function ?

  • @FirdausAziz
    @FirdausAziz Год назад

    Can you nest partials?

  • @valpagsibigan2544
    @valpagsibigan2544 Год назад

    Can you show us how to do a image search using django? If you search cat it will show images with cat

  • @rajeshrathod3113
    @rajeshrathod3113 Год назад

    How is it better or different from django-render-blocks?

    • @bugbytes3923
      @bugbytes3923  Год назад

      This is opinionated - I personally like being able to render the partial directly in the Django view, using the "render()" method. With render_block, you have to call a separate method to get your HTML, called "render_block_to_string()"

  • @tarsisiushp
    @tarsisiushp Год назад

    i came from node js, i want to ask is it possible to do this in flask?. I think flask is lighter than django. Thankyou

    • @bugbytes3923
      @bugbytes3923  Год назад +1

      It's possible but probably not with django-template-partials. You might wanna look at this package called "jinja2-fragments" to achieve the same thing with Flask:
      github.com/sponsfreixes/jinja2-fragments

    • @tarsisiushp
      @tarsisiushp Год назад

      @@bugbytes3923 thanks to youu