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.
I watched many videos, can't understand the concept
Finally watched your video, got the clear understating
Great explanation man. Thanks
This is absolutely amazing to understanding the concept of Database Relationship in Django.
You are champ bro , thanks
Very clear explanation. Beginner can also easily understand the django model relationship. Thank you Dipak bro.
Perfect explanation to understand relations in django.
superr videoo
You explained this so well, very helpful! 🙌
This something I was hunting for! thanks a lot
This is very nice video
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
Best video for django model relationship.
Thanks bro ❤👌
Thanks Brother! it's great.
Thank you so much for this video. Helped a lot! ❤
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.
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.
👍👍 good
thanks a lot bro...i have understand this concept...thanks for uploading this video..upload more videos bro
the best video ever,,, please post a video to authenticate user via email
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
make str method in your model and return string that you want. eg.
def __str__(self):
return self.title
@@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
Thanks 👏
Can you please tell how to handle the following query in django model
select column1 , column 2 , column3 from tabel_x where column4 = 'rowvalue'
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?
docs.djangoproject.com/en/4.0/topics/db/multi-db/#limitations-of-multiple-databases
But you can make it possible by writing your custom module/orm according to the requirement.
can you tell me how to display these multiple interest of a person on HTML using context and jinja .
Thanks bro👍
Tell how to insert data from front end into many to many field
please for the source code link sir
Now only got something idea in models
Can u explain select_related and prefetch_related bro
thanks you sir this is amazing please send source code.