Database Table Relationship in Django Models, One To One, Many To One and Many to Many

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024
  • Database Table Relationship in Django Models, One To One, Many To One and Many to Many
    Using Forward and Reverse relation to get objects from related objects and vice versa.

ความคิดเห็น • 33

  • @moneeshkumar1838
    @moneeshkumar1838 3 ปีที่แล้ว +5

    I watched many videos, can't understand the concept
    Finally watched your video, got the clear understating
    Great explanation man. Thanks

  • @davidandai_w412
    @davidandai_w412 2 ปีที่แล้ว +2

    This is absolutely amazing to understanding the concept of Database Relationship in Django.

  • @ApnaVlogs-tj7do
    @ApnaVlogs-tj7do 7 วันที่ผ่านมา

    You are champ bro , thanks

  • @balamuruganloganathan7039
    @balamuruganloganathan7039 2 ปีที่แล้ว +1

    Very clear explanation. Beginner can also easily understand the django model relationship. Thank you Dipak bro.

  • @surajadhikari7766
    @surajadhikari7766 3 ปีที่แล้ว +3

    Perfect explanation to understand relations in django.

  • @mohit8299
    @mohit8299 5 หลายเดือนก่อน +1

    superr videoo

  • @JaeBlaze07
    @JaeBlaze07 3 หลายเดือนก่อน

    You explained this so well, very helpful! 🙌

  • @sushmagowda6015
    @sushmagowda6015 ปีที่แล้ว

    This something I was hunting for! thanks a lot

  • @jayantkeer3416
    @jayantkeer3416 ปีที่แล้ว +1

    This is very nice video

  • @tarfiain
    @tarfiain ปีที่แล้ว

    Hey sir good evening......thank uh for your amazing video it clarifies my 3-4 doubts ....plz keep posting videos like this process only....thanks alottt sir.......and before living let me inform uh......your voice is
    Masha Allah ......may
    Allah accept your all hala dua's.....ameen.....stay concentrated and succeed sir...thank uh

  • @obulareddyguda567
    @obulareddyguda567 2 ปีที่แล้ว

    Best video for django model relationship.
    Thanks bro ❤👌

  • @teqteps5786
    @teqteps5786 2 ปีที่แล้ว +1

    Thanks Brother! it's great.

  • @irynafriaf5762
    @irynafriaf5762 ปีที่แล้ว

    Thank you so much for this video. Helped a lot! ❤

  • @gunjanp8576
    @gunjanp8576 6 หลายเดือนก่อน +1

    Sir i want to show table on my home page and in tabel there are columns like person name, addresss, city, intrest,etc. So how can i fetch all data in view and pass through context to template. Please help. In your tutorial you fetch data on the basis of id , i want that all the data without id.

    • @sangitniroula
      @sangitniroula  6 หลายเดือนก่อน

      I recommend watching my tutorial on making ecommerce using django. Here is the link to this th-cam.com/video/Iz09p_B8FI0/w-d-xo.html&ab_channel=DipakNiroula.
      You can find lots of ways of fetching data from database and presenting them in the UI there.

  • @ajaykryadav
    @ajaykryadav ปีที่แล้ว

    👍👍 good

  • @PrAsHaNtHdUke1093
    @PrAsHaNtHdUke1093 3 ปีที่แล้ว

    thanks a lot bro...i have understand this concept...thanks for uploading this video..upload more videos bro

  • @giteshraval8576
    @giteshraval8576 3 ปีที่แล้ว

    the best video ever,,, please post a video to authenticate user via email

  • @shahidullah233
    @shahidullah233 3 ปีที่แล้ว +1

    Best video to understand the relationship....i am having some problem in my project ....in the admin page some dropdown field show object(1)....not the name...i still cant figure it out what is the problem

    • @sangitniroula
      @sangitniroula  3 ปีที่แล้ว +1

      make str method in your model and return string that you want. eg.
      def __str__(self):
      return self.title

    • @shahidullah233
      @shahidullah233 3 ปีที่แล้ว +1

      @@sangitniroula i did...like yours models.py....i have 5 models class....in which last 2 class are connected to other 3 class....every str method works fine even i can see strings in the dashboard. Problem is....like your personadress class you inherited person name and city...like wise i also had inherited name from one class and city from another class...both are onetoone relation...now when i go to add person address to add new...i found name shows names but city shows cityobject(1).... I hope you can now understand....hope to get some solution

  • @AmitRajpurohit
    @AmitRajpurohit ปีที่แล้ว

    Thanks 👏

  • @aravindkumar9427
    @aravindkumar9427 2 ปีที่แล้ว

    Can you please tell how to handle the following query in django model
    select column1 , column 2 , column3 from tabel_x where column4 = 'rowvalue'

  • @VijayKumar-dq3ph
    @VijayKumar-dq3ph 2 ปีที่แล้ว +1

    Hi , do you have video explaining foreign key relations among tables of different databases or can you give any hint on how to achieve that?

    • @sangitniroula
      @sangitniroula  2 ปีที่แล้ว +1

      docs.djangoproject.com/en/4.0/topics/db/multi-db/#limitations-of-multiple-databases

    • @sangitniroula
      @sangitniroula  2 ปีที่แล้ว

      But you can make it possible by writing your custom module/orm according to the requirement.

  • @hari3658
    @hari3658 ปีที่แล้ว

    can you tell me how to display these multiple interest of a person on HTML using context and jinja .

  • @gouthami_pittala
    @gouthami_pittala 3 ปีที่แล้ว

    Thanks bro👍

  • @pradipathawale8285
    @pradipathawale8285 ปีที่แล้ว

    Tell how to insert data from front end into many to many field

  • @vonputtkamer1673
    @vonputtkamer1673 3 ปีที่แล้ว +1

    please for the source code link sir

  • @aravindkumar9427
    @aravindkumar9427 2 ปีที่แล้ว

    Now only got something idea in models

  • @aravindkumar9427
    @aravindkumar9427 2 ปีที่แล้ว

    Can u explain select_related and prefetch_related bro

  • @cricketisourpassion6956
    @cricketisourpassion6956 2 ปีที่แล้ว

    thanks you sir this is amazing please send source code.