Django OR query

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ •

  • @wannabedevo7
    @wannabedevo7 4 роки тому +10

    Thanks, just thanks! I really love and enjoy this channel. You're possibly the only creator with this quality level serving really in-depth knowledge about django. I Would love more videos regarding DRF and Deployment, and freecodecamp is also a great idea.

    • @veryacademy
      @veryacademy  4 роки тому

      Thank you! - Yeah DRF I haven't lost focus on that promise. I know I seem to be moving away from it - I most definitely am not. Time is never on my side - but it will continue shortly.

  • @heyrmi
    @heyrmi 3 роки тому +2

    I came here for Django ORM. Now I am Hooked to your channel.

    • @veryacademy
      @veryacademy  3 роки тому

      Hi Rahul! Thank you, and long may it continue! 👍

  • @chetty1212
    @chetty1212 2 роки тому +1

    you never fail to impress. i am implementing this django ORM SQL logic into my own project works amazing. thanks

  • @oliver1231033
    @oliver1231033 4 роки тому +2

    your tutorials are NEXT LEVEL! keep up the great work!

  • @RafathBinZafarAuvee
    @RafathBinZafarAuvee 3 роки тому +1

    This channel is under rated

  • @djangodeveloper07
    @djangodeveloper07 3 роки тому +3

    you have solid knowledge which we can see through your videos and teaching method. just new to your channel. Subscribed and following for your next videos. for now following your other playlists to get more knowledge about Django

  • @tbaror
    @tbaror 3 роки тому

    Like all your tutorials Gold value, thank you

  • @rangabharath4253
    @rangabharath4253 4 роки тому +1

    awesome. Everytime i watch your videos i will learn a new thing. Today i learned about sqlite extension in vscode. Previously about docker extension. Those are really very useful to explore data from vs code itself. Tq so much. You should definitely do a video on freecodecamp, so everyone will know about your awesome channnel. All the best :)

    • @veryacademy
      @veryacademy  4 роки тому +1

      Hi Ranga - thanks for the suggestion about freecodecamp - once I have everything in order and the plan is fully established here on UA-cam I will start to actively look for these types of opportunities. If you could for the time being add a few links here and there on social media - that would be most appreciated. I do actively try and add something new in each video 👍

    • @rangabharath4253
      @rangabharath4253 4 роки тому

      @@veryacademy Sure. Cheers :)

  • @Oda3908
    @Oda3908 4 роки тому

    Great tutorial! I am using debug toolbar to show the detail of queries but have not idea where does that info come from. BTW django-extensions is also a good tool to enhance the Django shell by running python manage.py shell_plus, which will import all existed models, Q, F, aggregate, and many useful functions on your behalf when launched, and use an ipython shell, quite recommendable.

  • @rare7647
    @rare7647 3 місяці тому

    amazing

  • @Ameyiscool
    @Ameyiscool 6 місяців тому +1

    Why isn't the or statement just returning the first query ??? Why is it returning both?

  • @rajughorai3909
    @rajughorai3909 4 роки тому +1

    really enjoying your content. do have any plan doing django cache.

    • @veryacademy
      @veryacademy  4 роки тому +1

      I am bumping it up the list - so many others have now asked for it.

  • @aniketanuse5694
    @aniketanuse5694 3 місяці тому

    How to enable | and query function

  • @biplob9764
    @biplob9764 3 роки тому +1

    Which version of Django are you using?

    • @veryacademy
      @veryacademy  3 роки тому

      Hi Bip, at the start of the tutorials it lists some of the important version numbers. Also, in the project repositories, normally you will see a file called requirements.txt - this gives you the version of all packages installed.

    • @biplob9764
      @biplob9764 3 роки тому

      @@veryacademy sorry I don't see any requirements file. can you please check this

    • @veryacademy
      @veryacademy  3 роки тому

      @@biplob9764 Sorry Bip - that is an older tutorial! I didnt notice that! It is Django 3.1

    • @biplob9764
      @biplob9764 3 роки тому

      @@veryacademy Thank you though. You are awesome!

  • @amjadsaleem1270
    @amjadsaleem1270 6 місяців тому

    So for me print(connection.queries) returns an empty list what am I missing?

  • @shivaramsrikanth
    @shivaramsrikanth 4 роки тому +1

    sir, if I want to activate this query from the webpage, how will I do it? What would be the url?

    • @veryacademy
      @veryacademy  4 роки тому +1

      Hey, Shivaram. Sounds like you are new to Django, it is a long explanation - however take a look at this beginners series ua-cam.com/play/PLOLrQ9Pn6cawWd-5UZM6CIm0uqFXeBcTd.html

  • @samiulsalehin1560
    @samiulsalehin1560 3 роки тому

    How to find which importables can be imported from django.db?

  • @jhutchtor1
    @jhutchtor1 2 роки тому +1

    Any chance this can be updated to Django 4 as it has changed and this no longer works.

  • @vamsikrishnaaliveli938
    @vamsikrishnaaliveli938 2 роки тому +1

    Hello bro i have written code : "print(connections.queries) " but it print empty list what i have to do

    • @veryacademy
      @veryacademy  2 роки тому

      Hey, hmmm does this help
      docs.djangoproject.com/en/4.0/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running

    • @vamsikrishnaaliveli938
      @vamsikrishnaaliveli938 2 роки тому

      @@veryacademy Hi !!!!, I put the " DEBUG=True " but i get the same result

  • @sanketnawale1938
    @sanketnawale1938 3 роки тому +1

    print(connection.query) is returning as empty list. Any suggestion?

    • @veryacademy
      @veryacademy  3 роки тому

      Would need to see a little more code

    • @sanketnawale1938
      @sanketnawale1938 3 роки тому

      @@veryacademy Well, I found out the issue but didn't understand the concept behind it. It return empty string when I do the following print statements:
      print(posts.query)
      print(connection.queries)
      It return the output when I also add:
      print(post).

  • @akshattrivedi4933
    @akshattrivedi4933 3 роки тому +1

    how to get an option to open database in pycharm?

    • @veryacademy
      @veryacademy  3 роки тому

      www.jetbrains.com/help/pycharm/database-tool-window.html
      let me know if this helps

    • @akshattrivedi4933
      @akshattrivedi4933 3 роки тому

      @@veryacademy sorry but this didn't help

    • @akshattrivedi4933
      @akshattrivedi4933 3 роки тому

      @@veryacademy there is no such an option of database in tool windows of view , the only options relates to the database are DB browser and DB execution console

    • @akshattrivedi4933
      @akshattrivedi4933 3 роки тому

      @@veryacademy waiting for your reply sir

  • @MagnusAnand
    @MagnusAnand 3 роки тому +1

    QUESTION: What's the benefit of using a Q object???

    • @veryacademy
      @veryacademy  3 роки тому +2

      Hi Guz,
      You can compose statements of arbitrary complexity by combining Q objects with the & and | operators and use parenthetical grouping. Also, Q objects can be negated using the ~ operator, allowing for combined lookups that combine both a normal query and a negated (NOT) query.
      docs.djangoproject.com/en/3.1/topics/db/queries/
      books.agiliq.com/projects/django-orm-cookbook/en/latest/query_relatedtool.html
      riptutorial.com/django/example/4565/advanced-queries-with-q-objects
      bradmontgomery.net/blog/adding-q-objects-in-django/

    • @MagnusAnand
      @MagnusAnand 3 роки тому

      @@veryacademy thanks