Full Stack React & Django [1] - Basic REST API

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In part 1 of this series we will setup a Django app and create a REST API with the Django Rest Framework. We will use Postman for API testing.
    Sponsor: DevMountain Bootcamp
    goo.gl/6q0dEa
    Code:
    github.com/bra...
    Helpful Links & Tuorials:
    www.django-res...
    www.valentinog...
    v1k45.com/blog/...
    💖 Become a Patron: Show support & get perks!
    / traversymedia
    Website & Udemy Courses
    www.traversymed...
    Follow Traversy Media:
    / traversymedia
    / traversymedia
    / traversymedia

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

  • @TraversyMedia
    @TraversyMedia  5 лет назад +249

    The series is now complete. There are 7 videos total. Again, I encourage you to code along :) Final code is in the description

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

      How long will this tutorial be?

    • @TraversyMedia
      @TraversyMedia  5 лет назад +8

      @@Geomaverick124 Prob about 6 videos around 3 hours or so. Just an estimate.

    • @GodIsGood-Always
      @GodIsGood-Always 5 лет назад +1

      Hey Brad, is it possible to become a web developer using your courses on udemy starting with the modern html and css? Your content is clear and of great quality. Thank you!

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

      @@TraversyMedia thanks for the reply. I was asking so that i could prioritize my learning. I am focusing on taking courses or projects that are under 5hrs. I realized that when i do a project on youtube or udemy it takes me 3x as long...so i was seeing where i will place this series in my learning...

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

      @@Geomaverick124 I wouls set aside 5 or 6 hours to complete. you have to account for errors and debugging, rewatching, etc

  • @joshuastevenson5140
    @joshuastevenson5140 5 лет назад +74

    INCREDIBLE TIMING!!!! I'm 80% of the way thru your Django Udemy course and having a React + Django tutorial to go thru afterwards is going to be the icing on the cake!!!!!!!!!!

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

    Been watching your videos and taking Udemy courses on web development for half a year. Used this video to prepare myself for the Backend technical interview. Yesterday I received an offer for a great job.
    Much respect and love, Brad! You are doing an amazing job :)

  • @rogerodipo3499
    @rogerodipo3499 5 лет назад +10

    I gotta say, man, I'm self-taught, and I haven't learned as much from anybody since the New Boston's Bucky back in 2013. Keep teaching; you're really good at this.

  • @Wilpsn
    @Wilpsn 5 лет назад +38

    This is insane, I was planning to do a personal project with exactly this technology. Nice timing.

  • @ValentinoGagliardiCoding
    @ValentinoGagliardiCoding 5 лет назад +68

    Thanks a lot for mentioning my tutorial Brad!

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

      No problem, nicely done :)

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

      Valentino, thanks also for your work. Brad did a great job in putting everything together, but your tutorial was a great input!

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

    i have been searching all the way to youtube to get a better understanding of django-rest. but i believe this one satisfied my search! Hats off sir.

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

    I have started this tutorial about two weeks ago, didn't uderstand much so I did some research. Learned some things about django, rest framework, redux and I am glad to be back here. I just love how you make it look so easy compared to others tutorials.

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

    I stumbled upon your channel one day and that's the best thing I ever stumbled on. I took your udemy courses as well as eduonix ones and I always watch out for your developer resources & tips videos. I learnt a lot from you and have made a very humble try to teach concept based development in my new channel DevHoot. No matter, where I am I always return here for learning new things. Thanks for your good work.

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

      I checked out your channel & to say it's humble will be an understatement. Keep up ur efforts & u'll surely get what u deserve.

    • @ImranKhan-qn1gv
      @ImranKhan-qn1gv 5 лет назад

      Good to hear such stories. Always inspiring.

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

    Wow what a timing, I'm a react developer and i know a lil bit of django so i just installed django REST framework to make some REST APIs for my react based self project. This is going to make my life more easier. Thanks a lot Brad :)

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

    I think this tutorial is great but without reading the Django docs first I was so lost. I read the Django docs and came back and this tutorial's worth finally starting shining bright. Thanks Brad.

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

      What section of the Django docs makes this video easier to understand? The documentation is too big and not sure what sections are important for this video.

  • @MyDailyEcho
    @MyDailyEcho 2 года назад +5

    I tried this but could not get far as it looks like everything is outdated. It would be amazing to make an updated project demonstrating building a lead management system with an endpoint ability that could plugin too, for instance, Zapier. (Pushing leads into the lead manager via Zapier or any other platform. I would buy such a course :-) Will be your first buyer! Thank you for all the tutorials! 🙏

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

    This is honestly the best django tutorial I've seen, and I've done a bit of searching.
    Beginner tutorials should be broken down into a simple way of thinking about it so they are easily digestible, and that's exactly what has been done here.
    Thank you!

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

    In case you are having trouble creating the virtual environment, run the command 'pip3 install pipenv==2018.11.26' instead of 'pip install pipenv'. That should solve the problem. Took me forever to find the solution to this.

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

    This tutorial series is a GODSEND! Thank you so much Brad! This is everything I need for a large project I'm attempting currently.

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

    This is one the best tutorials so far, I like your pace, some coders go so fast at 120 wpm and don't explain anything, you're the best!

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

    Excellent series, also in terms of teaching the stuff, not only regarding contents. I could learn a lot and am very thankful. Will definitely checkout also your paid courses. I have only little recommendations:
    - use browserrouter instead of hashrouter (I think nobody likes # in the URL)
    - how to allow proper refresh when using browserrouter
    - how to set up 404 etc. pages
    - sometimes you could mention why you are doing something, that was not always clear to me, just one or 2 sentences would help a lot
    - differentiate naming (using e.g. "leads" for all occasions is a bit confusing)
    Thanks again and keep up the great work!!

  • @marc-olivierblouin4709
    @marc-olivierblouin4709 5 лет назад +7

    I'm gonna love this series! plz, do a big project with Django/React/postgress this is an awesome stack!

  • @birarakisarap
    @birarakisarap 4 года назад +1

    How much great when you learn and teach some tech stack combinations i loved. You are gifted at decribing and teaching!

  • @ayanbanerjee5136
    @ayanbanerjee5136 5 лет назад +58

    Just love YOUR Content Brad!!

  • @jaimesastre1046
    @jaimesastre1046 4 года назад +2

    Great Tutorial!!!
    just a help info. In minute 20 you have a problem with the / slash at the end of the URL.
    You can modifie this in settings file by writing:
    APPEND_SLASH = True #so automatically the slash will be added if there is no.

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

    Your videos are the very best out of all the youtube programming videos I have ever watched.

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

    well designed and explained. I like how it starts with building the back end gradually and fully explains the steps. This tutorial is good for the junior developers who wants to dig into the react plus django setup.

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

    thanks man these tutorials are so engaging because of the way you teach. you explain really well but show us by doing and much more engaging to listen to. this is awesome thanks

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

    oh my god this is gold. So much better than other resources I was using

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

    Very excited about this course, since I am kinda confused now of how to take the best of React and Django for one app.
    Thank you so much, Brad!

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

    Travesy ... where ever you are !! God bless you..

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

    I have been looking for a course like this for ages. THANKS!

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

    Thank you Brad for the awesome content! I have taken a few of your courses on Udemy and love your teaching style. I had been working on a Django backend and a React-Redux frontend project and this tutorial is exactly the resource I needed. Thanks again!

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

    WOW! You just read my mind! I was researching for this combination yesterday! And here you are! Best as always

  • @wassimbelhadjrhouma2805
    @wassimbelhadjrhouma2805 4 года назад +1

    for windows users, you can have some problems :
    -to check python version :
    py --version
    -to install pipenv:
    py -m pip install pipenv
    - to open the shell :
    py -m pipenv shell

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

    I am planning to replace express/mongo with python flask or django in future for react projects . right content from you . thanks brad .

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

    Yes, finally. I've been looking for React/Django tutorial. You made my day, B.

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

    Thanks, brad you're awesome! and I bought your MERN course on Udemy! This is really helping me get through school and understand the concepts! Don't know what students and developers would do without you.

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

    Thank you Brad. Please make a series abou vue and django rest also please

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

    Thanks man! I've been looking for this for a while!

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

    after this Corona Lockdown I will be the master of universe thanks to you mr traversy

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

    21:26 it was fun they you talk 😂, thank you so much for your efforts Brad, I learned a lot.

  • @damilareemmanuel
    @damilareemmanuel 5 лет назад +7

    This is an awesome combination Brad!!! Thanks💟💟

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

      You Are always on Brad's Channel Before me bro, I'm Jealous 😍😍😍

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

      @@dammyola lol I have my notifications on for the channel that's why

  • @Raezon_
    @Raezon_ 4 года назад +1

    sorry you've missed a line
    on api.py for lead
    We need queryset =>queryset = Lead.objects.all()
    or it will print an error like that

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

    Hey Brad, I just want to know that I really like your tutors and videos and I'm very thankful for them. peace and love from Iran

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

    I really enjoyed all of your videos, they are all well designed and informative. I learned a lot from them and especially they are very well updated to the current modern web developing-designing technologies. Thank you so much. Hope to see more videos from you soon. Highly appreciated. :))

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

    Brilliant, thanks Brad. Just what I needed. Can't wait to get stuck into this tomorrow. Yay!

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

    All your courses are really nice and easy to follow. I finished the python, Django dev to deployment and I really wished you showed us how to load slugs instead to id in the url.

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

    I really appreciate the effort you put in. You’re AWESOME brad👍

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

    i'm following you'r advise and doing this API with vue.js.
    by the way i love react. 🤣🤣

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

    you are great sir on this planate

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

    Just as I finished the Django and MERN Courses on Udemy, perfect fitting!!

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

    Where have you been after all?? i found you like a treasure. Thumbs up and subscribed.

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

      Ikr.. I found him recently after living in caves of confusions

  • @beganovich
    @beganovich 5 лет назад +28

    Maybe revision of Django for 2019? Would love to see that.

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

      2019 = django==2.2 stable

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

    Yeeessss. I asked for it and I got it. Thank you so very much Mr Brad.

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

    Very much love from Nepal... I am following you

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

    Another great series that I cannot wait to watch. It's insane that you make these faster than I can watch them but I can't complain.
    Ever considered a series on Microservices and/or Kubernetes?

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

    Best tutorials so far!

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

    Keep going brad, u doing cool stuff simply

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

    Super, I know, what I'm going to do on (holidays) quarantine. Thank You, Maestro!

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

    set trainling_slash to false at defaultRouter will avoid that little headache: router = routers.DefaultRouter(trailing_slash=False)

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

    Thank you brad. You are the best

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

    Your videos are awesome. If you could increase your font size a little so the text is clear that’d make it top notch. Thanks for spreading your knowledge and helping the community.

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

    This is the path I want to go, React + Django. Can you please do more of these?

  • @md.akib5124
    @md.akib5124 5 лет назад

    so cool. Brad you are a gem.

  • @mr.mikaeel6264
    @mr.mikaeel6264 4 года назад

    Sry devMountain, you'll have to wait. Finishing up on going through the basics of everything needed for this. Now i know what i've been pumping keys for all this time. THIS is my Everest!

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

    Hope there will be this kind of video series with angular too

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

    The best tutorial, congratulations!

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

    This is really well done. Thanks!

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

    Great Content, really well explained!

  • @aashishmaharjan4175
    @aashishmaharjan4175 4 года назад +25

    Title should be "Full Stack React & Django [0] " 😂

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

    wow tnx Brad
    I'm not leaving home until summer 😊👌❤👏👏👏

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

    Thank You, thats so good and nice timing for me

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

    Thanks @Traversy Media for yet another great set of tutorial! I would love to know how to send mail in React using Django as a backend. Thanks yet again

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

    Awesome stuff, thanks for sharing this series. I am coding along with you.

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

    Hi Brad, I absolutely love the content that you produce, I actually drew inspiration to self teach myself on web programming after I stumbled onto one of your videos on youtube where u gave us your backstory, how u became a self-taught developer. Can u start a series on GREENSOCK ? There is almost no or complete video of greensock js library which is I think the best js library for creating epic animation on web.

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

    What a timing i was searching for this today ♥ God Bless You Brad :)

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

    Thanks Sir.
    Did resolve my problem !!

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

    The djangorestframework got updated and we are required to fix this:
    class LeadViewSet(viewsets.ModelViewSet):
    queryset = Lead.objects.all()
    serializer_class = LeadSerializers #this is required for the updated version
    permission_classes = [
    permissions.AllowAny
    ]
    serializer_class might be different but that shows as an error if not mentioned.

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

      my exact code still shows error
      Class 'Lead' has no 'objects' member

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

      @@UncleNabs Did you perform migrations, if yes then its a vscode error thing, Put objects = models.Manager() in the class. It might work

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

      @@kamranmoazzamansari7289 It's still saying the same thing. I tried to migrate before and it worked but that was before we created the api.py file. Now when I tried to migrate again it threw an error from .api import path, include
      ImportError: cannot import name 'path' from 'leads.api'

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

      @@UncleNabs ummm, from .api import LeadViewSet I think u made this from .api import path,include , which should have been, from django.urls import path, include I hope that works.

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

      check yours serializers.py file it should be fields = "__all__" not field = "__all__"

  • @user-hk3mu9ll9m
    @user-hk3mu9ll9m 5 лет назад

    This video is really really helpful. Thank you😍

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

    Mind Blown!
    Thank you so much. Cheers

  • @abinasha543
    @abinasha543 4 года назад +1

    { "detail": "Authentication credentials were not provided." }
    i get this error when using get/post request on postman
    any help??

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

    thank you so much sir for this video tutorials..🙏🙏

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

    Great tutorial, thanks a lot!

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

    I was looking for a tutorial on this topic thanks. :)

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

    Oh my God!!! Thank you!!!!! I was struggling with this

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

    I'm on windows 10. To get the setup working I had to do 'py -m ensurepip' because there was no pip file in my Python Scripts folder, and instead of 'pip install pipenv' I had to use 'py -m pip install pipenv'. Whenever he uses 'python' in the command prompt I instead use 'py' because 'python' doesnt work.

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

    The Incredible Brad

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

    For the people who wanto to use the PUT method is the same url but with the id at the end and a slash "localhost:8000/api/leads/{id_toUpdate}/" and in the body as raw send a new object like the POST method seems like you have to send complete objet not only the field to change

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

    Awesome series.

  • @robsonsilv4.
    @robsonsilv4. 5 лет назад

    Wow! Thanks Brad, this is the best combination im my opnion! Maybe with graphql in the next?

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

    Thanks Brad!

  • @abazur7742
    @abazur7742 5 лет назад +8

    3:19 for windows users its actually: py --version

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

    Right when I am about to dig a bit about Python!
    Thanks Mr. Brad...
    Hope you get back to PHP tips soon ..

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

    Django rest + Vue please

  • @kennyPAGC
    @kennyPAGC 4 года назад +1

    15:25 initializing it like that at runtime looks so awkward to me... isn't there a way to build the queryset through a method with arguments just like a regular constructor?

  • @SachinYadav-eh7vg
    @SachinYadav-eh7vg 5 лет назад +1

    Thank you ♥️

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

    What are the advantages of having react and django in one project folder? besides the obvious reason.

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

    from leads.models import Leads
    unresolved import 'leads.models' where i made mistake, how to fix it?

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

      I'm having the same issue, I'm not sure where it's coming from either...

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

      I figured it out. Change it to 'from .models import Leads'

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

      @@machollister2949 Thanks

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

      @@machollister2949 Thank you!

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

      @@machollister2949 Thanks

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

    I've only done spa independent react apps as well, I'm interested in making server side rendering with react and Django would this be related to that?

  • @pixel7038
    @pixel7038 4 года назад +8

    full-stack machine learning coders are getting hard on's

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

    Thank you 👨

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

    Hey Brad, can you also do a series on React & Symfony Rest API. Thanks for your awesome videos.

  • @isan-sunshine
    @isan-sunshine 3 года назад

    Thank You very much!!!