Understanding Django Model Relationships

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

КОМЕНТАРІ • 131

  • @prettyprinted
    @prettyprinted  4 роки тому +8

    Join my free course on working with the database and models in Django: prettyprinted.com/djangodata

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

      sir you are really great, you are providing free Django course for all student

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

      You all probably dont care at all but does someone know of a tool to log back into an instagram account..?
      I was stupid forgot my password. I would appreciate any tricks you can offer me

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

      @Nicolas Leroy instablaster :)

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

      @Justus Jaxx I really appreciate your reply. I found the site on google and Im in the hacking process atm.
      Looks like it's gonna take a while so I will get back to you later with my results.

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

      @Justus Jaxx It did the trick and I actually got access to my account again. Im so happy:D
      Thank you so much you really help me out!

  • @agata0214
    @agata0214 4 роки тому +5

    It took my bootcamp teacher 90 minutes to explain what you just did in less than 30 minutes. He left me lost and confused, yet you made me understand everything so clearly. Thank you so much.

  • @adnauseam1265
    @adnauseam1265 4 роки тому +16

    Thank you for beautifully summarizing what would have been hours of research for me.

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

      You're welcome. I'm glad I could help

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

    The best explanation of model relationship i have ever seen on UA-cam , thanks for this awesome video

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

    I come back to this video from time to time, great content.

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

    You explain those so easy way

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

    the 07:05 error was very educative !

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

    Very easy to understand explaination.

  • @dricard953
    @dricard953 5 років тому +2

    Best explanation I've seen so far. Thanks very much. You deserve many more subscribers!

  • @OneBigAwkwardMoment
    @OneBigAwkwardMoment Рік тому

    so clear and concise

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

    Thanks a lot sir, you nailed it....
    love you from India.

  • @mohamedabdi8377
    @mohamedabdi8377 5 років тому +12

    the first youtube video with zero dislikes i have seen!

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

    Thank you for your clear explanation about models relationship

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

    A very good explanation

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

    First of all a big love from India ❤️. This is a awesome tutorial. I never thought I will get that kind of professional knowledge for free. I also join your free class. I really appreciate your hard work ❤️. Please make more videos on django

  • @current1710
    @current1710 5 років тому +5

    Great explanation! Thank you.

  • @justhored12
    @justhored12 5 років тому +6

    Thank you so much! Keep doing what you do :)

    • @prettyprinted
      @prettyprinted  5 років тому +1

      You're welcome! Thank you for watching.

  • @jmpersic
    @jmpersic 5 років тому +1

    Dude, your videos are great. Thanks for the explanations.

  • @MrGenbu
    @MrGenbu 5 років тому +2

    easy , on the point , helpful video

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

    Thank you very much. When concluding on one to many relationships you said you'll get into more about it in another video,which one?

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

    Thank you for this video! Going through a django course right now and this was huge help! Nice to see quality django tutorials on here. Will be buying the course soon.

  • @pradipyash
    @pradipyash 5 років тому +1

    Thanks this is really helpful. I have been looking this type of video for long.

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

    Wao superb explanation ✌️

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

    Good explanation

  • @emmanuelmichira6261
    @emmanuelmichira6261 5 років тому +4

    This is really helpful, thanks.

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

    Great tutorial on Django Model relationships! I read quite a few tutorials on this but did not really get it until I watched your video. THANK YOU! Liked and subscribed. I can't wait to watch the other videos you posted. (Thor for president!) =)

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

    Hey Anthony, great explanation and easy to understand, keep going with more stuff! Thanks ;-)

  • @sarazare3335
    @sarazare3335 5 років тому +1

    Very clear and helpful! Thanks a lot!!

    • @prettyprinted
      @prettyprinted  5 років тому

      You're welcome! Thanks for watching.

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

    In One-to-one relationship, we are getting only 1 attribute data. what we have to do to get all fields data?

  • @Fire_Fly_101
    @Fire_Fly_101 5 років тому +3

    This video was really helpful.. Thanks bro

    • @prettyprinted
      @prettyprinted  5 років тому

      You're welcome! Thanks for watching.

  • @k.bharathreddy7238
    @k.bharathreddy7238 2 роки тому

    can i create an suggest friends notification api using model relationships

  • @forbidden_lion
    @forbidden_lion Рік тому

    Love you man!

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

    Comment, like, subscribe, and the bell. Thank you very much for all your hard work. Appreciate it, man.

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

    wonderful video thanks a lot

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

    This is a great tutorial. Thanks a lot!

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

    thanks for the great video

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

    The best video tutorial ever for django. Awesome explanation . I immediately joined your django tutorial course . Is any GitHub Repository available to refer the code available in this video ?

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

    Thank you so much...🥺😇🙏🙏🙏

  • @danieluxury
    @danieluxury Рік тому

    Amazing ♡♡♡ thank you so much

  • @lphs455
    @lphs455 Рік тому

    How do you clear the shell?

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

    Great, easy to follow. Thanks alot!!

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

    Great tutorial, thanks! could anyone tell me what shell it is he is using btw? looks nice

  • @DanielDaniel-hk9el
    @DanielDaniel-hk9el 4 роки тому

    About the example "Frameworks and Languages", how can i add a field on Languages and put the quantity of framework have the language?

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

      For that you will have to use the annotate and aggregate functions ....Anthony has done a separate video on this topic

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

    Thank you 🙏🏼

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

    Thank you

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

    Perfect Tutorial 👍thanks alot!!

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

    Extremely useful, Thank you sooo much 💞

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

    Best explanation ever! Thank you.

  • @isaachatilima
    @isaachatilima Рік тому

    Hi late to the party. I have a question, say I have 3 models, Country, State or Province and City or Town. Country ID if FK in Province/State. Should I have County and State PK as FK in City or just state FK and when I query a city I would be able to get all city, state and country details? If so, how can that be done?
    Thanks.

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

    so helpful

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

    hey what is the tool you are using for db visualisation

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

    Pretty nicely explained !

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

    Thanks a lot

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

    Why does the many-to-many table requires its own id? (Thx for the Video! :)

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

      Is it to add the same character multiple times to one movie? ... and vice versa?

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

    Gold!!! Great work

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

    sir can u please make a video on django channels real time chat app with rest api

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

    That was awesome

  • @LiaAdzumi
    @LiaAdzumi 5 років тому

    Thanks for this great and helpful tutorials.

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

    on ManyToMany example Django created charater_movieS table. Is it a convention for it to add S to the name? is there a way to kinda sort this out without looking into DB - for what is the name of the table? I mean yeh I could go terminal sqlite3 or other terminal for db and schema it up, but is there a simple way or scheme to find it out?

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

    How you got that response as tables for sqlite

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

    Thanks bruh

  • @milandudhatra7484
    @milandudhatra7484 5 років тому

    Thanks for the perfect video. you are great.

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

    I could feel Corey Chafer intro

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

    Dear sir please explain oneTOone field too. Please

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

    Thank u so much,you teach me the concept at once :}

  • @dhanunjaypaila4865
    @dhanunjaypaila4865 5 років тому

    I have a requirement to load Excel data to postgres in django. I have created models and loading using pandas dataframe (to_sql). Buy I have a chally here in building relationships between models. As far as I know, we can build relationships if we save model objects one by one using (onetoone, foreign key,manytomany). Please help me how to create relationships when we upload Excel data in one shot

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

    great video! thanks

  • @aditt19
    @aditt19 5 років тому

    You are awesome dude 👌👌❤️

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

    clear and concise!

  • @Techie-time
    @Techie-time 5 років тому

    Video is informative. However like any other video on this subject it indirectly assumes that the database structure started after Django was born. The fact is Data relationships or intricacies of databases are not the subject of django or any other framework. We need to look at this subject as ability of the framework to handle data relationship in a database.

  • @YogeshKumarMurugesan
    @YogeshKumarMurugesan 5 років тому

    Thanks for the tutorial 👍

    • @prettyprinted
      @prettyprinted  5 років тому +1

      You're welcome! Thanks for watching.

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

    thanks !!!

  • @junartagulao6063
    @junartagulao6063 5 років тому

    This is really helpful.. You are really great!!! I have a question, how will you apply that in "for loop" in the template using ForeignKey that will print the Language and also the associated Frameworks.. Thanks in advance :-)

    • @prettyprinted
      @prettyprinted  5 років тому

      Each individual language will have an attribute called language_set. You can use that to get all the languages. So you'd have two loops in the template.

    • @24junar
      @24junar 5 років тому

      Thank you so much for your time answering my question..Please make more django tutorials.. :-)

  • @hasan8267
    @hasan8267 5 років тому

    very clear thank you

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

    great video

  • @buncha1499
    @buncha1499 5 років тому

    This is awesome, thanks! :)

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

    I thought you can only save without specifying a field by saying commit = false. But here we somehow do it without

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

    Awesome!

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

    perfect!

  • @tamirtsogbayar3912
    @tamirtsogbayar3912 5 років тому

    Hello thanks for all lesson
    i try ot making recruiting website but i have some problem
    i have 3 models
    general, education, experience
    general has his last name first name address phone ect
    education has his school information and general id
    also experience has his work experience information and general id
    problem is how to insert all data same time and get and insert general id pls help me

    • @prettyprinted
      @prettyprinted  5 років тому

      You insert backwards from the child to the parent. So create the child first, save it to get the ID, and then add to parent.

  • @ThePieas
    @ThePieas 5 років тому

    Bro, can we query them using id ?
    For example. I have a table of movie and another table of actors.
    Python automatically gives an ID to a model.
    so can we query them with that id ??
    I tried this Actors.objects.filter(movie__id = 1) which failed
    Thanks In Advanced

    • @prettyprinted
      @prettyprinted  5 років тому

      Yes, of course. What do you mean it fails?

    • @ThePieas
      @ThePieas 5 років тому

      @@prettyprinted sorry, It is working now. I don't know what happened earlier.
      You are an awesome teacher. Currently watching the free django course on prettyprinted.com .. after finishing this i will buy the full course.

    • @prettyprinted
      @prettyprinted  5 років тому +1

      @@ThePieas Awesome. I look forward to seeing you in the course.

  • @deeraj3069
    @deeraj3069 5 років тому

    awesome video....

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

    The link to the Database Essentials course is returning a 404.

  • @kyojindev3978
    @kyojindev3978 5 років тому

    thx for video. but it`s so trivial. i think to illustrate ManyToMany example.
    is to use self-relation.
    class FacebookProfile(models.Model):
    .......
    friend_relationship = models.ManyToManyField("self")
    many people didn't know about this.

    • @prettyprinted
      @prettyprinted  5 років тому

      I'll consider making a video on self relationships. Thanks for the idea.

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

    It would be nice if you use better zoom.In spite of that, ok!:)

  • @atlaschooty
    @atlaschooty 5 років тому

    Damm, amazing..

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

    perfect... and thanku

  • @vamshinoora7914
    @vamshinoora7914 5 років тому

    just need that in gui

  • @Ali-kx7jf
    @Ali-kx7jf 3 роки тому

    #_BEST_EVER_

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

    +

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

    This guy is true fan of captain america

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

    First you say "language='python' no i can't do that"... 30 sec later you created bottle just like this...

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

    Well-explained, thank you for this!

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

    Thank you!