Тёмный

Django QueryDict | GET parameters | django-filter 

BugBytes
Подписаться 27 тыс.
Просмотров 2,6 тыс.
50% 1

In this video, we look at how to extract values from GET requests in Django. We look at the nuances of extracting multiple values for a single field, for example from a form submission with a "select multiple" field, and how to process these in the backend.
We'll also see how to use django-filter to extract the logic of filtering away from our View code.
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
ko-fi.com/bugbytes
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
06:07 Django QueryDict getlist() method
08:35 Filtering servers by GET parameter values
11:47 Using Django-filter MultipleChoiceFilter
▶️ Full Playlist:
• Django ORM Deep Dive
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: bugbytes.io/posts/
👾 Github: github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
QueryDict objects: docs.djangoproject.com/en/4.2...
django-filter: django-filter.readthedocs.io/...
#python #django #webdevelopment

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

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@seydinaoumarsamabaly1806
@seydinaoumarsamabaly1806 6 месяцев назад
I swear you bring Django to another level. The best ever. Thank you Master 🙌🏾🙌🏾🙌🏾.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot for that comment, really appreciate it! As always, thanks mate!
@helloh6
@helloh6 6 месяцев назад
Great video again! Definitely would be great to see a video including HTMX in this.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks! Will quickly create a small video for this soon!
@AmoahDevLabs
@AmoahDevLabs 6 месяцев назад
Great series, Thanks very much for your super gist. Anyway let us sprinkle some htmx on our html.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot! Will create a short video today on HTMX-ifying the form!
@repotranstech9614
@repotranstech9614 6 месяцев назад
Cool video and usefu video,as always.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot!
@robhafemeister3100
@robhafemeister3100 6 месяцев назад
Another excellent video, your content is the best. Very concise.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot Rob!
@grossibp
@grossibp 6 месяцев назад
Hi, yes please, the option with HTMX is good.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Creating + recording that video today - will release soon!
@danfan4707
@danfan4707 6 месяцев назад
Nice video 😁 It would be cool if the checkboxes were still selected after submitting.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Great point! Should've included it. Thanks for watching!
@aashayamballi
@aashayamballi 6 месяцев назад
Thank you!
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks for watching!
@Julian_T
@Julian_T 6 месяцев назад
Thanks for your django content! 🚀
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot for watching!
@aafan.kuware
@aafan.kuware 6 месяцев назад
very well explained, really helpful.
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks a lot!
@frameff9073
@frameff9073 6 месяцев назад
🤩 thank you
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks!
@DhavalAhir10
@DhavalAhir10 6 месяцев назад
Make video on Django channels bro.
@bugbytes3923
@bugbytes3923 6 месяцев назад
It's in the pipeline! Lots coming up.
@khalilbenmeziane8836
@khalilbenmeziane8836 6 месяцев назад
thank you , more django and fastapi video please
@bugbytes3923
@bugbytes3923 6 месяцев назад
Much more to come - thanks!
@serychristianrenaud
@serychristianrenaud 6 месяцев назад
Thanks
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks for the comment!
@user-pd1oj3el8z
@user-pd1oj3el8z 2 месяца назад
I really enjoyed your video even though I don't speak English! Is it possible to somehow do this not using hardcoding, but with an o2m connection, so that other categories can be added to the admin panel? (was translated with the help of a translator)
@keyton_weissinger
@keyton_weissinger 6 месяцев назад
Thank you! Quick question: Have you begun looking at Django 5 at all?
@bugbytes3923
@bugbytes3923 6 месяцев назад
I've had a quick look but nothing too in-depth yet. Might try and do a quick video over the holidays!
@Septumsempra8818
@Septumsempra8818 6 месяцев назад
Anyone had the following problem: you use select_relayed or prefetch. Instead of getting restaurant.name you now have restaurant__name. Now you cant use the same template for these two queries and have to use python to drop the __ and build a dictionary. This feels slow an not "pythonic". How do we get restaurant.name even from a prefetch or select_related query?
@swelanauguste6176
@swelanauguste6176 6 месяцев назад
Please do with HTMX
@bugbytes3923
@bugbytes3923 6 месяцев назад
Thanks for the suggestion - it will be released today!
@swelanauguste6176
@swelanauguste6176 6 месяцев назад
@@bugbytes3923 Thanks a lot. We appreciate you
Далее
HTMX-ify a Django list page!
8:35
Просмотров 8 тыс.
GeneratedField in Django 5 - New Django Model Field!
23:19
HUMAN BASKETBALL! 👀🏀🤣 | Triple Charm #Shorts
00:15