Django OR query

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

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

  • @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!

  • @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

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

    This channel is under rated

  • @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 RUclips 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 :)

  • @Ameyiscool
    @Ameyiscool 6 месяцев назад +1

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

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

    Like all your tutorials Gold value, thank you

  • @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.

  • @amjadsaleem1270
    @amjadsaleem1270 5 месяцев назад

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

  • @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!

  • @jhutchtor1
    @jhutchtor1 2 года назад +1

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

  • @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 ruclips.net/p/PLOLrQ9Pn6cawWd-5UZM6CIm0uqFXeBcTd

  • @aniketanuse5694
    @aniketanuse5694 3 месяца назад

    How to enable | and query function

  • @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.

  • @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).

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

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

  • @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

  • @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

  • @rare7647
    @rare7647 3 месяца назад

    amazing