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

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 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.

  • @user-vu1sv2yu6v
    @user-vu1sv2yu6v ปีที่แล้ว +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!

  • @seydinaoumarsamabaly1806
    @seydinaoumarsamabaly1806 ปีที่แล้ว +2

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

    • @bugbytes3923
      @bugbytes3923  ปีที่แล้ว

      Thanks for commenting mate - and yes, agreed!

  • @onnot701
    @onnot701 8 หลายเดือนก่อน +1

    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

  • @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

  • @user-qs3vs2gb7z
    @user-qs3vs2gb7z ปีที่แล้ว +2

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

    • @bugbytes3923
      @bugbytes3923  ปีที่แล้ว +1

      Agreed! And thanks for watching!

  • @krystian-magdziarz
    @krystian-magdziarz ปีที่แล้ว +2

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

  • @allieuslee-yq1mz
    @allieuslee-yq1mz ปีที่แล้ว +1

    I learn a lot about htmx thanks to you. 👍

    • @bugbytes3923
      @bugbytes3923  ปีที่แล้ว

      Glad to hear that, thanks for the comment!

  • @robhafemeister3100
    @robhafemeister3100 ปีที่แล้ว +2

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

  • @s0lci70
    @s0lci70 ปีที่แล้ว +1

    you're so so helpful!!

  • @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.

  • @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

  • @proofit404
    @proofit404 ปีที่แล้ว +1

    Лучший!

  • @user-xu7jz4li7e
    @user-xu7jz4li7e ปีที่แล้ว +1

    Nice!

  • @ale6au
    @ale6au ปีที่แล้ว

    Thanks one more time for the great tutorial!

  • @frameff9073
    @frameff9073 ปีที่แล้ว +1

    thank you

    • @bugbytes3923
      @bugbytes3923  ปีที่แล้ว +1

      You're welcome, thank you for watching!

  • @repotranstech9614
    @repotranstech9614 ปีที่แล้ว

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

  • @Panzerboy006
    @Panzerboy006 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

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

  • @mario.valkovic
    @mario.valkovic ปีที่แล้ว

    super helpful content as always!

  • @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 11 หลายเดือนก่อน +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).

  • @CodeForChange
    @CodeForChange 4 หลายเดือนก่อน

    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

  • @mrfran1
    @mrfran1 8 หลายเดือนก่อน

    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 5 หลายเดือนก่อน

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

  • @FirdausAziz
    @FirdausAziz ปีที่แล้ว

    Can you nest partials?

  • @rampageshary8194
    @rampageshary8194 ปีที่แล้ว

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

  • @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