Build a Rest API with Django Rest Framework

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

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

  • @tomgauthier843
    @tomgauthier843 2 года назад +11

    I LOVE how you spent most of the tutorial showing the explicit but repetitive way of doing it. What makes me stuck with Django REST Framework is that there is too much "magic" going on. It's so important to see how it works in details when we're not using ModelSerializers or other magic classes.

  • @calistusobeke7520
    @calistusobeke7520 2 года назад +17

    Am a frontend developer, but just started backend (django) late last month. I must confess this is the third video tutorial have gone through on RUclips on Django, but this very one is top notch. Thanks for sharing.
    I will be glad if you can also share authentications (register and login) as well. Thanks a bunch

  • @entity5678
    @entity5678 Год назад +1

    This is my first video on this channel..subscribed to your channel. What an underrated channel!! You deserve millions of subscribers. I am going to watch your videos..

  • @ekeneezedi1065
    @ekeneezedi1065 Год назад +1

    was struggling to undertand django after buying a course, if only i had seen this video, loved the detailed explanation, great job

  • @magicmedia7950
    @magicmedia7950 2 года назад +1

    Best explanation on Django API I have come across on RUclips. Thanks for sharing

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

    love the way you teach. So calm and easy. Even if my native language isn't english, I can fully understand you. Love from Pakistan.

  • @amadeuscam1
    @amadeuscam1 2 года назад +2

    Great tutorial as always!!!

  • @z.heisenberg
    @z.heisenberg 8 месяцев назад

    subscribed sir..wont say much..but u cleared everything thank you.

  • @mbkr230
    @mbkr230 2 года назад +3

    Any chance you’d be able to please make a react pagination video, where the data is coming from an api but also include a search bar in the same project?

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

    you make it really simple! thank you so much

  • @naufalnasrullah6965
    @naufalnasrullah6965 11 месяцев назад

    need more django tutorial such as auth

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

    Very helpful for a beginner. Please do authentications and authorizations too. Needed urgently

  • @waceemvirk7396
    @waceemvirk7396 2 года назад +3

    If you pass a wrong id while fetching against id it will trough an error. It will not work with get_by_pk function if but If your try this method it will work perfectly because it's returning from the above function and after it will be inside get function to try this method. Thanks
    def get(self, request, pk):
    try:
    book = Book.objects.get(pk=pk)
    serializer = BookSerializer(book)
    return Response(serializer.data)
    except:
    return Response({
    'error': 'Book does not exist'
    }, status=status.HTTP_400_BAD_REQUEST)

    • @kuipercat8899
      @kuipercat8899 10 месяцев назад

      Thank you! Was wondering what was wrong with my code, but this helped.

  • @francistrujillo2488
    @francistrujillo2488 7 месяцев назад

    Your repo does not have the code pushed. main branch only without any of your code.

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

    Thank you for this video! It was awesome =]

  • @mahendranath2504
    @mahendranath2504 10 месяцев назад

    Thank you so much for the amazing content 👍🙏🤝👋🫡👌🫶🏻✌️👏🏻😎👌🫶🏻

  • @zulfiqar7967
    @zulfiqar7967 2 года назад +3

    On next video, try to do Web3, Blockchain course

  • @sumitbhatkar5041
    @sumitbhatkar5041 2 года назад +1

    I will be glad if you can also share authentications (register and login) as well. Thanks a bunch

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

    can you write e-commerce use django all fremwork(rest_api,auth,static_file ,templates,users,)

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

    Excellent tutorial, very thanks

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

    thank you, everything you have done happens in the api. what about the real app?. consider someone who already has a django app, and they want to create an api to tinker with it. what changes can they make on this your code

  • @murshid956
    @murshid956 7 месяцев назад

    the code is not available in the repo. can you update it.

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

    Very helpful thanks a lot !

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

    thank u very much

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

    Great tutorial!

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

    Great tutorial

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

    OMG! Thanks so much!

  • @Saketh-Chandra
    @Saketh-Chandra 2 года назад +1

    Can we have the Source code for reference?

  • @tomgauthier843
    @tomgauthier843 2 года назад +1

    Thanks

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

    Hello, working with the get by pk function does not work when the id is not in the database, it returns an atribute error page

    • @nikhil.r.sirimane1749
      @nikhil.r.sirimane1749 Год назад

      The get_book_by_pk function returns the error response to the get function, instead make the get function return the error response.
      class putpostdelete(APIView):
      def get_book(self,pk):
      try:
      book = Book.objects.get(pk=pk)
      return book
      except:
      return 1
      # return Response({
      # "Error":"Book does not exist"
      # },status=status.HTTP_404_NOT_FOUND)

      def get(self,request,pk):
      book=self.get_book(pk)
      if book==1:
      return Response({
      "Error":"Book does not exist"
      },status=status.HTTP_404_NOT_FOUND)
      Smoething like this.

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

    Nice tutorial.
    Please what about authentications

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

    this api working for integrating in flutter

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

    Integration of Chrome extension and api calls plase

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

    awesome

  • @yaolu485
    @yaolu485 10 месяцев назад

    For those who are confuzed about why the PUT mehtod acting like a POST in the section of "Class View"
    One return is missed in the demostration, it should be like this(I have my own variation repalced book with picture):
    def get_picture_by_pk(self,pk):
    try:
    picture = Picture.objects.get(pk=pk)
    return picture

    except:
    return Response({"Error":"picture not found"},status=status.HTTP_404_NOT_FOUND)

  • @bhatesaim
    @bhatesaim 7 месяцев назад

    This video is so hard to follow. Immediately after typing new code, you switch to a different file, so the viewer has to rewind the video if they didn't type everything that you just typed, down to the second. When you refactor, why are you doing that? What are the benefits and disadvantages? After we refactor using APIView, your justification is "I like that a whole lot better." These aren't legos or a painting of a lake, it's logical code and knowing the WHY matters a ton, especially if we're refactoring something for the third time.

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

    This was a really good, concise and accurate course. Thanks!

  • @moylababa8196
    @moylababa8196 2 года назад +2

    you explain every things very well. after tried lots of premium and youtube docker tutorial, finally your docker crash course make things easy for me. Please make a nodejs microservices tutorial with kafka if possible.best wishes

  • @abdulrochman9966
    @abdulrochman9966 3 месяца назад

    Terima kasih. Sangat membantu

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

    From where is the create() method (at this timestamp: ruclips.net/video/mlr9BF4JomE/видео.html) in the Book model called? I didn't see it anywhere in the code.

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

    Hi, what if i want to update only one field? For example I want to update description of id "1"???

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

    good job i search django tutorial in youtube and your tutorial very clearly for me thanks
    👌

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

    lol you r the goat

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

    thanks for the tutorial. it was very helpful.

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

    This is a great tutorial.. I was looking for a quick tutorial and this one is just right.

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

    When should I use viewsets instead of views?

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

    Awesome video, thanks so much.

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

    Thanks a lot for the amazing course!

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

    Very helpful thanks a lot !

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

    I like this, very clear

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

    code ? коде ?