This video is gold. You deserve a lot more subscribers man. Try starting a podcast or releasing some shorts to gain more momentum. I'm not even saying this just for you, so many more people can be educated with such high quality content if you push further.
About 20 years. And yeah, I use Python as my main language. I've pretty much forgotten everything but Python and JavaScript, which is a shame, but that's what my business is focused on. Thanks for watching!
@@prettyprinted That's a lot of years of experience. I would love to get in contact for some mentoring. I hope we can schedule something. I'll check your website
I love this tutorial, but I do have a question regarding this topic. Suppose I have a form of country and city displaying on my html, and I want every time I select a country, HTMX is triggered to display the current saved city for that country below the form, how can I make that possible? I hope you can make a tutorial to explain how this can be achieved. Thanks for all the tutorials you have posted on your TH-cam channel, they are more than amazing.
Can I do a video request? Can you make a video of a flask application with kafka. Where 1 route is creating data and 2 routes are using that data and data needs to be saved in database. (Additional) if 2nd route of reading data can update it.
Despite how great and informative the tutorial is I have a bone to pick with these types of HTMX tutorials in the context of a Django project. Correct me if I'm wrong, Anthony, but this is not how you would do it in a template of a real Django project, right? Mostly due to `extends` functionality. We would always extend base.html (or similarly named) file in a template. So when you hx-target a div with a specific id, doesn't it mess up the whole layout of the page? Don't we have to use a librarly like django-htmx to check for `if request.htmx` condition in the view and then render the partial? Please tell me that I am a complete idiot if I confused myself here, I don't mind, I'm still learning.
Extending a base template is useful so all your pages have a similar layout, and it's probably a good idea on normal pages, but it's not necessary on partial templates. When it comes to hx-target, you can target anything anywhere the template; you don't' need to target something that will break the page unless that's your intention. And finally, for libraries like django-htmx, I'm sure they offer some patterns and convenience features that are useful when using HTMX, but it's not at all necessary to use django-htmx or anything similar. Don't worry about this stuff being confusing though. There's a lot to learn so if the style of using templates in Django works for you now, continue with it.
I believe all of the extends magic happens server side and since HTMX does have some JS but its hidden behind the special attributes it still executes client side. The only thing HTMX changes is where you would previously return a JSON you can return your result as a formatted HTML doc and it will take care of the rest.
Hehe, i was just doing htxm and flask 😂 Quick think i learn If i do request.json in a route. Then its header would switch to application/json. Why i was doing request.json Because i was trying to use hx-vals i thought these would be different from hx-params But turns out that they are just same.
Another simple but awesome tutorial Anthony💪. Thanks to remind me how to properly use `Q` class👌. Is it possible to convert a Django project to installation form, I mean like programs from `.exe` or `.deb` files? Forasmuch i have a computer in my work (Windows 11) without the internet access and i'm going to write a program to make my work easier and more efficient.
This video is gold. You deserve a lot more subscribers man. Try starting a podcast or releasing some shorts to gain more momentum. I'm not even saying this just for you, so many more people can be educated with such high quality content if you push further.
Excellent
The legend himself back at it🎉🎉
Some Quick questions, How long have you been programming? Do you use python as your main language?
About 20 years. And yeah, I use Python as my main language. I've pretty much forgotten everything but Python and JavaScript, which is a shame, but that's what my business is focused on. Thanks for watching!
@@prettyprinted That's a lot of years of experience.
I would love to get in contact for some mentoring.
I hope we can schedule something. I'll check your website
I love this tutorial, but I do have a question regarding this topic. Suppose I have a form of country and city displaying on my html, and I want every time I select a country, HTMX is triggered to display the current saved city for that country below the form, how can I make that possible?
I hope you can make a tutorial to explain how this can be achieved.
Thanks for all the tutorials you have posted on your TH-cam channel, they are more than amazing.
Awesome. Thx
Can I do a video request?
Can you make a video of a flask application with kafka.
Where 1 route is creating data and 2 routes are using that data and data needs to be saved in database.
(Additional) if 2nd route of reading data can update it.
Despite how great and informative the tutorial is I have a bone to pick with these types of HTMX tutorials in the context of a Django project. Correct me if I'm wrong, Anthony, but this is not how you would do it in a template of a real Django project, right? Mostly due to `extends` functionality. We would always extend base.html (or similarly named) file in a template. So when you hx-target a div with a specific id, doesn't it mess up the whole layout of the page? Don't we have to use a librarly like django-htmx to check for `if request.htmx` condition in the view and then render the partial?
Please tell me that I am a complete idiot if I confused myself here, I don't mind, I'm still learning.
Extending a base template is useful so all your pages have a similar layout, and it's probably a good idea on normal pages, but it's not necessary on partial templates.
When it comes to hx-target, you can target anything anywhere the template; you don't' need to target something that will break the page unless that's your intention.
And finally, for libraries like django-htmx, I'm sure they offer some patterns and convenience features that are useful when using HTMX, but it's not at all necessary to use django-htmx or anything similar.
Don't worry about this stuff being confusing though. There's a lot to learn so if the style of using templates in Django works for you now, continue with it.
I believe all of the extends magic happens server side and since HTMX does have some JS but its hidden behind the special attributes it still executes client side. The only thing HTMX changes is where you would previously return a JSON you can return your result as a formatted HTML doc and it will take care of the rest.
Hehe, i was just doing htxm and flask 😂
Quick think i learn
If i do request.json in a route. Then its header would switch to application/json.
Why i was doing request.json
Because i was trying to use hx-vals i thought these would be different from hx-params
But turns out that they are just same.
good
Thanks!
Another simple but awesome tutorial Anthony💪. Thanks to remind me how to properly use `Q` class👌. Is it possible to convert a Django project to installation form, I mean like programs from `.exe` or `.deb` files? Forasmuch i have a computer in my work (Windows 11) without the internet access and i'm going to write a program to make my work easier and more efficient.