Django Q Objects / Filtering with OR and NOT Conditions / Pattern Matching and Regex Lookups

preview_player
Показать описание

In this video, we'll look at how to use Q Objects in Django. These can be used to build complex lookups that can be composed with logical AND, OR and NOT conditions in SQL, and can also be used to extract parts of complex queries into dedicated objects.

We'll also look at how to do pattern matching with the SQL "LIKE" operator, and Django's 'icontains' and 'endswith' lookup; as well as how to do more complex pattern matching with regular expressions, using the 'regex' lookup.

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:

▶️ Full Playlist:

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:

#python #django #webdevelopment #database #sql
Рекомендации по теме
Комментарии
Автор

This guy is unique and exceptional that people who want to go deep into Django must have to go through topics he has explained in his playlist. Thankyou for helping the community.

noorzaibchohan
Автор

A great tutorial as usual. Thank you Master for the effort put in the service of people !

seydinaoumarsamabaly
Автор

Again, a great tutorial. Q and F objects are really powerful. When I have a frontend where I can search/filter over several fields I take the request and build a list of Q objects from the request and then unpack them in queryset filter i.e. Restaurants.objects, filter(reduce(operator.and_, q_query_list)).

khunjohn
Автор

Hi, thank you so much for many amazing tutorials. I have watched most of them, and they have been very very useful! Would you be able to create a tutorial on displaying a network graph in Django?

wisemify
Автор

Great explanation and Great content best for you bro

JoseLuisMorales
Автор

Great tutorial. Any tips for how to implement a captcha to check if human in forms?

mizzlehd
Автор

i learn django while i learn english, thanks lasdasd

ssgto
Автор

Lesson learned, if you want to make a profit, don't add a number in your restaurant name.

syedazeemjaved
join shbcf.ru