Django Search

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 83

  • @amirhosseinmoayedi6205
    @amirhosseinmoayedi6205 3 года назад +2

    thank you man, and I never imagined getting rick role in the middle of a Django tutorial :))

  • @jonmonts7412
    @jonmonts7412 3 года назад +13

    Thank you for all the videos you dropped on Django. You have spotlighted some features that are buried within the Django documenting that some people might have not seen due to Django’s vast documentation. This showcases the power of Django’s features.

    • @veryacademy
      @veryacademy  3 года назад

      Thanks Jon, that is a very measured analysis of the content in this tutorial. It is very difficult to find and balance the various expectations of the audience.

    • @jonmonts7412
      @jonmonts7412 3 года назад

      @@veryacademy You can not always please everyone with the content that is released. Someone always wants something else that you may have not released or based on a project they are working at the time. People need to take the examples that are released and experiment with them or use them as stepping off point to look deeper into the topic that was presented. Thanks again

  • @zourdy697
    @zourdy697 3 года назад +5

    dude you deserve getting an award for this!! love the way you teaching

  • @bubulray1106
    @bubulray1106 3 года назад

    Thank you for putting this video on RUclips, it was really helpful.

  • @fernandtape9363
    @fernandtape9363 3 года назад +1

    Hi Zander and welcome back to the django ecommerce series. Thanks

    • @veryacademy
      @veryacademy  3 года назад

      Hey Fernand. Glad you messaged. Apologies for lack of e-commerce. I am working on v2, don’t have an eta but will focus on some Django relative subjects that can be incorporated

  • @sampearson3752
    @sampearson3752 11 месяцев назад +1

    Zander, GOOD JOB!

  • @ngotuanhien
    @ngotuanhien 3 года назад

    Thank you for your tutorial

  • @dodokwak
    @dodokwak Год назад

    Great tutorial.thx

  • @codedjango
    @codedjango 3 года назад +2

    Excellent ...as always

    • @veryacademy
      @veryacademy  3 года назад +1

      Hi, hope you are well!

    • @codedjango
      @codedjango 3 года назад

      Absolutely fine and enjoying your Django tutorials :)

  • @harunturkoz1036
    @harunturkoz1036 2 года назад

    Thank you so much! ❤

  • @mohamedsoliman5082
    @mohamedsoliman5082 3 года назад +1

    Thank you, it is possible to combine between TrigramSimilarity and SearchRank

  • @GerardoSabetta
    @GerardoSabetta Год назад

    This is great, I'm trying to remove the dependency to elasticsearch in our project. Do you have any advise on how to put everything together (Triagram, SearchRank, full text search) to get search results as close as what elasticsearch would return?

  • @XeUs87
    @XeUs87 2 года назад

    Thaaaaank you so much for this video. I learned a lot. but I have a problem with the index part. It doesn't improve the query time at all, I don't know what the problem is!

  • @chowadagod
    @chowadagod 3 года назад

    lovely tutorial..could please do a tutorial base on deployment with apache or gunicorn or uwsgi or asgi etc 🤷‍♂️🤷‍♂️🤷‍♂️ especially with windows OS

  • @iyadsaleh3695
    @iyadsaleh3695 3 года назад +1

    You are really very academic

  •  3 года назад +1

    Great content

  • @seungcheolshin5539
    @seungcheolshin5539 3 года назад

    Thanks to your lecture, I reviewed bread and butter of django, docker setup, and learned how to improve query performance by using General Inverted Index.
    May I ask what is prefix-match labels in postgres? It would means that Postgres finds data whether prefix are matching or not, but I'm not sure of it.
    Suggestion: It would be good to add a statement about q variable, since we might get 'UnboundLocalError'
    Thank you Xander. I really appreciate it.

  • @oscarmuneza
    @oscarmuneza 3 года назад

    Hello everyone, I would like to congratulate you on the quality of your videos.
    I would like to know if you plan to make a video on django elasticsearch dsl drf?
    I would like to learn a little more but the documentation is too big and I get lost

  • @osamaalhosni6833
    @osamaalhosni6833 3 года назад +1

    Thank you, sir.

  • @ahmedaminetouahria7019
    @ahmedaminetouahria7019 2 года назад

    wow ! thank you bro

  • @MannyTalaroc
    @MannyTalaroc 3 года назад

    Thank you!
    May I know why do you need to use Docker instead of the regular PGAdmin4? Will this work when deploying the app in AWS Elastic Beanstalk?
    How do you search using TrigamSimilarity with multiple inputs from the form fields and model fields?
    Thanks!

  • @100PEACEOFLIFE
    @100PEACEOFLIFE 2 года назад +1

    ***IMPORTANT***
    If someone has problems with Django authentication in Postgres or you cant see migrates in pgAdmin, check if you have installed Postgres in your local machine and delete it because conflict occurs and many errors happen

    • @veryacademy
      @veryacademy  2 года назад

      Sounds important - thank you

  • @DhruvSharma-zu7pq
    @DhruvSharma-zu7pq 3 года назад +1

    Xander is the bestt!

  • @etiennerobert6462
    @etiennerobert6462 2 года назад

    At the end of your video, Book.objects.filter(title__trigram_similar=q).annotate(similar=TrigramSimilarity('title', q)).order_by('-similar') returns an empty list on my machine soI can't tell if GIN_index is working. Could you give us a similar code line that would return some book objects in few milliseconds?

  • @kailasvs73
    @kailasvs73 3 года назад

    Will u do video in django microservice

  • @abdelrhmanahmed1378
    @abdelrhmanahmed1378 3 года назад +1

    please answer me question on e-commerce project wich is :
    when i add item to the basket without login i have session id ,and when i login i have different session id but it still remember the item i put in the basket ?
    is it using the cycle_key() function to obtain new session id while retaining the data inside the old session !?

    • @veryacademy
      @veryacademy  3 года назад +1

      Hi Abdelrhman, thank you for your question. When you log in you are storing the basket data and the login data in your session. docs.djangoproject.com/en/3.2/topics/http/sessions/

    • @abdelrhmanahmed1378
      @abdelrhmanahmed1378 3 года назад

      @@veryacademy thank you for your effort ♥️

  • @MrRahul15937
    @MrRahul15937 2 года назад

    Sir,
    Requesting you to create Google form kind of feature in django, if possible.

  • @hasibulhasansiju
    @hasibulhasansiju 3 года назад +1

    Great video. Learned many things.. SearchRank is returning every single row even if it's not a match ... I am a little confused :(

    • @veryacademy
      @veryacademy  3 года назад +1

      Yes it’s ranked the whole queryset, you need to filter

    • @hasibulhasansiju
      @hasibulhasansiju 3 года назад

      @@veryacademy course_objects.annotate(rank=SearchRank(vector, query)).filter(rank__gte=0.1).order_by('-rank')... Yes found this way to filter now it's fine.. can I use both SearchRank and Trigramsimilarity at the same time?

    • @veryacademy
      @veryacademy  3 года назад

      @@hasibulhasansiju Yes - but lets remember what each approach is offering. You might first rank to filter results then use trigram for example.

    • @hasibulhasansiju
      @hasibulhasansiju 3 года назад

      @@veryacademy Understood Thank you so much

  • @navaneethangn1215
    @navaneethangn1215 11 месяцев назад +1

    Can API's be written too for FTS? Please reply

    • @veryacademy
      @veryacademy  11 месяцев назад

      Yes, you can certainly build APIs (Application Programming Interfaces) that involve Full-Text Search (FTS). Full-Text Search is a technique used to search and retrieve text data from a database, and it's often applied in various applications, including APIs.

    • @navaneethangn1215
      @navaneethangn1215 11 месяцев назад

      Thank you for the reply, I have worked as a backend developer (DRF) before, I'm going to purchase your Django ORM mastery on udemy today, what are your suggestions or road map for someone to master Django?

  • @clashnub
    @clashnub 2 года назад

    How to search multiple models

  • @RinkuKumar-rt6bi
    @RinkuKumar-rt6bi 3 года назад

    Hello sir ,
    You are a genius 👏.
    Can u help me?
    User has signup in django but if user will not login within a week then sign up is automatically expired?
    Can u give me some advice for above problems?
    Please reply

    • @veryacademy
      @veryacademy  3 года назад +1

      Sure, on signup capture the time/date in a new field called say account created. Make a cron job to check last logged in date and trigger an action. Maybe you flag their account using a Boolean field as expired and another cron job deletes the account after another set time.

  • @rahul_singh_rajput3292
    @rahul_singh_rajput3292 3 года назад +1

    Can i use it in default databse?

    • @veryacademy
      @veryacademy  3 года назад

      Unfortunately this is very Postgres centred.

  • @hakimdz3358
    @hakimdz3358 3 года назад

    Why can't I find a form to get data? with search form

    • @veryacademy
      @veryacademy  3 года назад +1

      Sorry mate, not sure I understand you?

    • @hakimdz3358
      @hakimdz3358 3 года назад

      @@veryacademy For example, the contact form, I put a search for it by number or name, and when I click search, it gives me all the information

    • @veryacademy
      @veryacademy  3 года назад +1

      From what I understand you have 2 fields in your form and you want to search by name or number?

    • @hakimdz3358
      @hakimdz3358 3 года назад

      @@veryacademy
      no , i have two form ..
      1- form input search : 1 file texte
      2- form contact : i have exmple 3 fiels
      * first name
      * last name
      * age
      I want to get the data in the contact form
      When you press search
      exmple input search : HAKIM
      form contact
      first name : HAKIM
      last name : ZERROUKI
      age : 30

  • @nahidujjamanhridoy9677
    @nahidujjamanhridoy9677 3 года назад

    Can I request a video? If I can then can you please make a video about user verification email, forget password system and social login system for Django?

  • @hakimdz3358
    @hakimdz3358 3 года назад +1

    I want to communicate with you plz

    • @veryacademy
      @veryacademy  3 года назад +1

      Hi Hakim, thank you. I am happy when and if I can answering questions here.

    • @hakimdz3358
      @hakimdz3358 3 года назад

      @@veryacademy
      in django Table example:
      {"id":1, "name": "MAGAZIN,"number":10}
      {"id":2, "name": "STOCK,"number":20}
      I want to get a number from a column Just
      To do an arithmetic with another object in views
      exmple 20 -10

    • @veryacademy
      @veryacademy  3 года назад

      See if this helps - else get back to me
      stackoverflow.com/questions/45593440/how-to-execute-arithmetic-operations-between-model-fields-in-django
      riptutorial.com/django/example/30557/execute-arithmetic-operations-between-fields
      code.djangoproject.com/ticket/20930

    • @hakimdz3358
      @hakimdz3358 3 года назад

      @@veryacademy
      I need queryset to do math operations in a table
      This is a wrong example but to understand :
      A = consomable.objects.get(name="STOCK") - consomable.objects.get(name="MAGAZIN")
      A= 20-10
      A= 10
      I don't know how to get a int number :(

    • @veryacademy
      @veryacademy  3 года назад

      {"id":1, "name": "MAGAZIN,"number":10}
      {"id":2, "name": "STOCK,"number":20}
      Are you asking me - how do you return '20' from the field 'number'?

  • @myanch200
    @myanch200 3 года назад +1

    It is really difficult to follow this tutorial as you are not explaining almost anything

    • @veryacademy
      @veryacademy  3 года назад

      Thanks Martin, I understand. In the GitHub repo there is a notes file with links to support this tutorial.

    • @myanch200
      @myanch200 3 года назад +1

      @@veryacademy Hello , again I have just managed to watch the whole video, thank you for all your effort I still stand behind my opinion that it is not very easy to follow you.
      Especially for people on mac or ubuntu. I had problems with docker , then the other massive problem was the fact that you are not writing the code you are reading us the code out loud , but in my opinion that is not enough . There were parts were my code was not working just because I didn't write something correctly or didn't import something accordingly . I am not saying that is your fault , you do what you think its best ,but as someone that is watching tutorials I had to watch 2 or 3 different tutorials search in forums just to figure some of the part ( To actually understand them not to just write on my computer thinking that I have done something) The part where you are explaining the actual queries was really good and obviously that is your main point in the video , but there were lots of questions left.
      Reading the code is not teaching method it is something that I can do even if you have recorder 20 seconds video saying open this github repo and you will see different searching methods with postgres and django.
      P.S Thank you once again for your effort I am not hating or anything just giving you some feedback so that you can improve and we can learn.
      P.S 2 The indexing part blow my mind nice stuff and I will definitely use it in future projects.

    • @veryacademy
      @veryacademy  3 года назад

      Thanks Martin. Appreciate you taking your time to provide very valuable constructive feedback.
      Without such interactions It is difficult or impossible to understand how tutorials should be improve. If you had a little more time I wonder if you might be able to provide your opinion on solutions to the issues you have mentioned. I have added to my list to build a supporting tutorial for a docker first steps on win Mac and Linux as a reference for when there is a need to use docker in a tutorial. What I am interested in understanding from you is your opinion on how code should be best introduced/presented.

    • @myanch200
      @myanch200 3 года назад

      @@veryacademy Hello , really appreciate this conversation so I will try to point you some of the things that can be improved.
      The things that I would change is just reading the code I think that when you are writing the code during the tutorial people can understand the whole flow more correctly as well as your way of thinking . When you just show me 30 lines of code and tell me " this is because we need that then we use that function here and then we do that " I do not feel it like tutorial I feel it like reading out loud something that you have written couple of days ago and while github helps with having the full code stored it cannot hold your ideas about the project and the things you have considerate . For example I had problem with q = form.cleaned_data['q'], because I was using q = form.cleaned_data('q') stupid mistake , but when the code is just presented not created along with the explanation it is really easy to make a mistake. If you think that the video will be too long just split it into a couple of parts create a series , create a playlist with 10 videos of 20 minutes each it will gain you more views that one long video. On the first part showcase the project get people hyped about it . Make sure to understand most of the tricky parts of your code for example requirements.txt make sure to have links for problems like "password authentication failed for user "postgres"
      Understand that the code that you are showing is something that is debugged and fit to work on your machine. (That would be resolved if you use docker in all your videos and provide the tutorial for docker that you are planning) . I completely understand that nothing is perfect on this world. But there is room for improvement and I am really happy to give you my feedback.