Understanding Django Model Relationships

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

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

  • @prettyprinted
    @prettyprinted  4 года назад +9

    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

  • @ermalgashimramori
    @ermalgashimramori 2 года назад

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

  • @arungautam6493
    @arungautam6493 2 года назад

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

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

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

  • @successivevichu4313
    @successivevichu4313 2 года назад

    Thank you for your clear explanation about models relationship

  • @dricard953
    @dricard953 5 лет назад +2

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

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

    the 07:05 error was very educative !

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

    You explain those so easy way

  • @jmpersic
    @jmpersic 5 лет назад +1

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

  • @cityrunner-x3x
    @cityrunner-x3x 4 года назад

    Very easy to understand explaination.

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

  • @HopWorksET
    @HopWorksET 4 года назад

    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!) =)

  • @OneBigAwkwardMoment
    @OneBigAwkwardMoment Год назад

    so clear and concise

  • @pradipyash
    @pradipyash 5 лет назад +1

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

  • @mohamedabdi8377
    @mohamedabdi8377 5 лет назад +12

    the first youtube video with zero dislikes i have seen!

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

  • @forbidden_lion
    @forbidden_lion 2 года назад

    Love you man!

  • @justhored12
    @justhored12 5 лет назад +6

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

    • @prettyprinted
      @prettyprinted  5 лет назад +1

      You're welcome! Thank you for watching.

  • @angtranhai6457
    @angtranhai6457 4 года назад

    Great, easy to follow. Thanks alot!!

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

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

  • @bektursunsamatuulu9772
    @bektursunsamatuulu9772 4 года назад

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

  • @WolfKelley1
    @WolfKelley1 5 лет назад

    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.

  • @MrGenbu
    @MrGenbu 5 лет назад +2

    easy , on the point , helpful video

  • @nirvikagarwal6575
    @nirvikagarwal6575 4 года назад

    A very good explanation

  • @current1710
    @current1710 5 лет назад +5

    Great explanation! Thank you.

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

    Perfect Tutorial 👍thanks alot!!

  • @sarazare3335
    @sarazare3335 5 лет назад +1

    Very clear and helpful! Thanks a lot!!

  • @_DixitParmar
    @_DixitParmar 4 года назад

    Extremely useful, Thank you sooo much 💞

  • @emmanuelmichira6261
    @emmanuelmichira6261 5 лет назад +4

    This is really helpful, thanks.

  • @davidcol0125
    @davidcol0125 4 года назад

    Best explanation ever! Thank you.

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

  • @MariusSemeonOrtiz
    @MariusSemeonOrtiz 4 года назад

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

  • @BohdanDuCiel
    @BohdanDuCiel 4 года назад

    Gold!!! Great work

  • @Fire_Fly_101
    @Fire_Fly_101 5 лет назад +3

    This video was really helpful.. Thanks bro

  • @mohamedmoselhy8514
    @mohamedmoselhy8514 4 года назад

    Well-explained, thank you for this!

  • @wajahatali226
    @wajahatali226 4 года назад

    Wao superb explanation ✌️

  • @Apoorvpandey
    @Apoorvpandey 4 года назад

    Pretty nicely explained !

  • @mojaba8546
    @mojaba8546 4 года назад

    wonderful video thanks a lot

  • @LiaAdzumi
    @LiaAdzumi 5 лет назад

    Thanks for this great and helpful tutorials.

  • @kiyotaka627
    @kiyotaka627 4 года назад

    thanks for the great video

  • @be_curious123
    @be_curious123 2 года назад

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

  • @danieluxury
    @danieluxury Год назад

    Amazing ♡♡♡ thank you so much

  • @PremSai2244
    @PremSai2244 4 года назад

    hey what is the tool you are using for db visualisation

  • @AmineOnline
    @AmineOnline 4 года назад

    Good explanation

  • @k.bharathreddy7238
    @k.bharathreddy7238 2 года назад

    can i create an suggest friends notification api using model relationships

  • @milandudhatra7484
    @milandudhatra7484 5 лет назад

    Thanks for the perfect video. you are great.

  • @isaachatilima
    @isaachatilima 2 года назад

    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.

  • @lphs455
    @lphs455 Год назад

    How do you clear the shell?

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

  • @aditt19
    @aditt19 5 лет назад

    You are awesome dude 👌👌❤️

  • @renzyndrome
    @renzyndrome 5 лет назад

    clear and concise!

  • @lewismujana6010
    @lewismujana6010 5 лет назад

    great video! thanks

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

    That was awesome

  • @pyderator
    @pyderator 4 года назад

    Thanks a lot

  • @sowjanya4146
    @sowjanya4146 4 года назад

    so helpful

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

  • @akshatsingh6036
    @akshatsingh6036 4 года назад

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

  • @KeepCalmProgrammers
    @KeepCalmProgrammers 5 лет назад

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

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

  • @rabim8819
    @rabim8819 2 года назад

    Thank you

  • @YogeshKumarMurugesan
    @YogeshKumarMurugesan 6 лет назад

    Thanks for the tutorial 👍

    • @prettyprinted
      @prettyprinted  5 лет назад +1

      You're welcome! Thanks for watching.

  • @saipraneeth4030
    @saipraneeth4030 4 года назад

    How you got that response as tables for sqlite

  • @brianm2572
    @brianm2572 5 лет назад

    great video

  • @KrisAlcordo
    @KrisAlcordo 4 года назад

    Thank you!

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

    I could feel Corey Chafer intro

  • @hasan8267
    @hasan8267 5 лет назад

    very clear thank you

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

  • @buncha1499
    @buncha1499 5 лет назад

    This is awesome, thanks! :)

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

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

  • @deeraj3069
    @deeraj3069 5 лет назад

    awesome video....

  • @syedshahbaz7481
    @syedshahbaz7481 4 года назад

    Dear sir please explain oneTOone field too. Please

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

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

  • @ReejohnStellas
    @ReejohnStellas 2 года назад

    Thanks bruh

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

  • @sahilbisht3661
    @sahilbisht3661 4 года назад

    perfect!

  • @deadlock107
    @deadlock107 5 лет назад

    Awesome!

  • @secretboxkevin
    @secretboxkevin 5 лет назад

    thanks !!!

  • @tamirtsogbayar3912
    @tamirtsogbayar3912 6 лет назад

    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  6 лет назад

      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.

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

  • @ivtechnet6661
    @ivtechnet6661 5 лет назад

    perfect... and thanku

  • @MUZIXABA
    @MUZIXABA 5 лет назад

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

  • @kyojindev3978
    @kyojindev3978 6 лет назад

    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  6 лет назад

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

  • @atlaschooty
    @atlaschooty 5 лет назад

    Damm, amazing..

  • @vamshinoora7914
    @vamshinoora7914 5 лет назад

    just need that in gui

  • @aleksanderradziszewski1242
    @aleksanderradziszewski1242 4 года назад

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

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

    This guy is true fan of captain america

  • @Ali-kx7jf
    @Ali-kx7jf 3 года назад

    #_BEST_EVER_

  • @RL89pl
    @RL89pl 5 лет назад

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

  • @ramiz3570
    @ramiz3570 4 года назад

    +

  • @muskankaushik3834
    @muskankaushik3834 2 года назад

    This is a great tutorial. Thanks a lot!

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

    Thank you 🙏🏼