Тёмный

How to Create an Instant Search Bar With Django and HTMX 

Pretty Printed
Подписаться 96 тыс.
Просмотров 1,3 тыс.
50% 1

Instant search bars in Django apps with HTMX.
WORK WITH ME👇🏼
✅ Implement features and fix bugs in your app: Live, one-on-one screenshare
prettyprinted....
💻 Code written in video
prettyprinted....

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@drac8854
@drac8854 Месяц назад
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.
@ABMA79
@ABMA79 7 дней назад
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 RU-vid channel, they are more than amazing.
@LegionLeague
@LegionLeague Месяц назад
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.
@prettyprinted
@prettyprinted Месяц назад
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.
@hamadrehman853
@hamadrehman853 Месяц назад
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.
@hamadrehman853
@hamadrehman853 Месяц назад
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.
@drac8854
@drac8854 Месяц назад
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.
@frameff9073
@frameff9073 Месяц назад
good
@prettyprinted
@prettyprinted Месяц назад
Thanks!
@dodokwak
@dodokwak Месяц назад
Awesome. Thx
@krzysiekkrzysiek9059
@krzysiekkrzysiek9059 Месяц назад
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.
@VenomRaiders
@VenomRaiders Месяц назад
The legend himself back at it🎉🎉 Some Quick questions, How long have you been programming? Do you use python as your main language?
@prettyprinted
@prettyprinted Месяц назад
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!
@VenomRaiders
@VenomRaiders Месяц назад
@@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
Далее
HTMX for Impatient Devs
8:33
Просмотров 55 тыс.
7 minutes to polling with Django and HTMX 🗳️
7:38
PolyAPI 101 - Introduction Demo
29:38
Просмотров 76
How to Stream OpenAI API Responses in a Flask App
16:59
Getting Started With Django Celery Beat
13:07
Просмотров 11 тыс.
Django & HTMX - Dynamic Form Creation and Submission
24:36