React Django Crud Tutorial - Learn React Python Django In 1 Hour | For Beginners

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

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

  • @xzex2609
    @xzex2609 3 месяца назад +7

    this was very helpful but actually there are a lots of problems that needed to be taken care of , Like
    the input fields must have been two way bounded so you can control the field after creating the book (clean them).
    the back end needed to check if the book is already exist and don't let you add more.
    the front end needed to check if the response is ok then add the contents so the empty book does not added when the database reject that the book is already exists.
    the backend needed to check if the both of the fields are provided then add them to the database
    I add some of the solutions
    if not title and not release_year:
    return Response({'detail': 'the title and the year is not provided'}, status=status.HTTP_400_BAD_REQUEST)
    if Book.objects.filter(title=title, release_year=release_year):
    return Response({'detail': 'Book already exist'}, status=status.HTTP_400_BAD_REQUEST)
    add value field in the input for twoway bounding and settitle('') setReleaseYear('') in every functions the it needs
    and check the response
    if (response.ok) {
    const data = await response.json();
    setBooks(b => [...b, data]);
    // Reset the input fields after adding the book
    setTitle('');
    setReleaseYear('');
    } else {
    const errorData = await response.json();
    console.log("Error:", errorData);
    alert("This book already exists in the database.");
    }
    and lastly use turnary opetator instead of if else
    setBooks(b => b.map(book => (book.id === id ? data : book)));

    • @ttaylor9916
      @ttaylor9916 14 дней назад

      thanks for the heads up

  • @okellocrystal6538
    @okellocrystal6538 2 месяца назад

    This was perfect, very intricate but also easily palatable and flowing. You should def make more of this. Thank you so much.

  • @arhabersham
    @arhabersham 3 месяца назад +17

    🙌🏽 Pedro Pedro Pedro, Pe-dro PE 🎵

  • @bahdcoder
    @bahdcoder 3 месяца назад +2

    as i saw this video and i started praying for you.. thank you pedro

    • @Misica11000
      @Misica11000 2 месяца назад

      Not beginners friendly

  • @arhabersham
    @arhabersham 3 месяца назад +4

    The tutorial I been waiting for, from the content creator I been growing with ❤

    • @PedroTechnologies
      @PedroTechnologies  3 месяца назад +1

      Hope you enjoyed it!

    • @dev-akeel
      @dev-akeel 3 месяца назад

      ​@@PedroTechnologies For sure.

    • @Misica11000
      @Misica11000 2 месяца назад +1

      To much unexplained things with django and bekend,you learn nothing from this video

  • @abdrahim9307
    @abdrahim9307 3 месяца назад +2

    we need more tutorials like this 🎉❤

  • @ebubeoguejiofor5094
    @ebubeoguejiofor5094 3 месяца назад +7

    He made the video...yay!

    • @Misica11000
      @Misica11000 2 месяца назад

      And what you learned from this video yayy?...Nothing,yayyy

    • @ebubeoguejiofor5094
      @ebubeoguejiofor5094 2 месяца назад

      @@Misica11000 you seem to be having a blast, trolling people on the Internet to make up for your own lack of skill and intelligence 🙂. Good luck with that.

  • @madhurabs4741
    @madhurabs4741 2 месяца назад

    Thank you so much !!!!!!!!!! I really mean it!!!! I completed the complete Tutorial. I learned a lot from this.. I used axios in my project.This is very helpful in the long run

  • @roginit8861
    @roginit8861 8 дней назад

    This video is very helpful for me. Thank you

  • @AAA-f1m
    @AAA-f1m 2 месяца назад

    YES!!!!
    Are we going to get an intermediate video?

  • @sick73
    @sick73 2 месяца назад +1

    Pedro, thanks for all the content. i have a request: if you could help us by making a vid on how you would implement a register, login and logout to this same CRUD app. thanks in advanced!!

  • @joaoarthurbandeira
    @joaoarthurbandeira Месяц назад

    Hey Pedro, it would be AWESOME if you could do a video with Django Rest (backend) + Nextjs (frontend) with maybe using tools like redux toolkit, rtk query, JWT authentication and how they interact with one another. Cheers!

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

    this was great . simple . right to the point. good stuff

  • @l.r4121
    @l.r4121 2 месяца назад

    Dude, amazing tutorial. Helps me a lot! Thanks!

  • @hrithik3204
    @hrithik3204 Месяц назад

    continue the videos like this and cover all the topics of django and react we are waiting

  • @derek7710
    @derek7710 2 месяца назад +2

    labeled "for beginners" I really wish there was more guidance on set up, atleast direction to useful articles, as python especially for mac users runs into a lot of issues

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

    Need full stack project react/next and django for backend 👀✅🔥

  • @davidmukoro1166
    @davidmukoro1166 2 месяца назад

    Nice one. let's try to deploy this to shared Linux server and also with Mysql .

  • @MouSes222
    @MouSes222 12 дней назад

    So helpful, thx man !

  • @Mr.ilyassLofi
    @Mr.ilyassLofi 2 месяца назад +1

    Thank you for this work, I learned a lot from you. 🐾🌀

  • @abidusage9765
    @abidusage9765 Месяц назад

    I'd like to know who we can use a relation one to many in this same tutorial. Eg: we can have class Language, also class Framework. Now the framework can exist if language exists. Help us to understand all the concepts about it

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

    I needed this. You are God sent 🙏🏾

  • @miladnicolas8858
    @miladnicolas8858 Месяц назад

    great video it help me a lot thks 👌👌

  • @genesy479
    @genesy479 3 месяца назад +1

    Thanks so much, knew this was coming

  • @anjaneyulub2529
    @anjaneyulub2529 3 месяца назад +1

    Awesome content Pedro❤

  • @Sreekanth-s
    @Sreekanth-s 2 месяца назад

    This was awesome! Thank you so much!

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

    I am so grateful Thanks so much for the video i did run into some errors with React and i saw the if statement and replaced it with this turnary instead
    const data = await response.json()
    setRecipes((prev) => prev.map((recipe) => recipe.id === pk ? data : recipe
    )) and you can add the catch (err) etc here

  • @emericriviere220
    @emericriviere220 25 дней назад

    very useful tutorial !

  • @edouardhalimi3514
    @edouardhalimi3514 Месяц назад

    Very usefull, thank you !

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 3 месяца назад

    Thank you, I was just looking for a video like this

  • @xzex2609
    @xzex2609 3 месяца назад +1

    I add some functionality to the create end point not to let add books when it is available in the data base and when the title is null I will copy the code for others.
    @api_view(['POST'])
    def create_book(request):
    data = request.data

    title = data.get('title')
    release_year = data.get('release_year')

    if not title and not release_year:
    return Response({'detail': 'the title and the year is not provided'}, status=status.HTTP_400_BAD_REQUEST)
    if Book.objects.filter(title=title, release_year=release_year):
    return Response({'detail': 'Book already exist'}, status=status.HTTP_400_BAD_REQUEST)

    serializer = BookSerializer(data=data)
    if serializer.is_valid():
    serializer.save()
    return Response(serializer.data, status=status.HTTP_201_CREATED)

    return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

  • @mikeross934
    @mikeross934 3 месяца назад +2

    pls do some videos on jwt authentication with Django rest framework!

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

    Good stuff as always Pedro would be cool if you could do a video on supabase and react

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

    Nice, waiting for laravel react

  • @narayanreddy5531
    @narayanreddy5531 2 месяца назад

    Thank you! Nice content

  • @godofwar8262
    @godofwar8262 3 месяца назад +1

    Hey will you make a backend series with javascript

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

      Dave grays Node course or MERN stack is great , both use node and express js. and he is the best teacher

  • @KkKk-k1s1y
    @KkKk-k1s1y Месяц назад

    can you post more React Django Tutorial or project, since i have a final year project coming pls!!!

  • @praveertiwari3545
    @praveertiwari3545 3 месяца назад +1

    thanks a lot dude

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

    hey pedro i was just requesting if you can clarify for the following things.. i am just a react guy and recently i have seen your firebase tutorial and i was following over them my question is can i totally use firebase as my solid backend because i have no knowledge about backend language... the other thing is can i partially usee firebase only when it comes to authenticatication part and use RTK querry of which i know it better fro thee CRUD operation . thanks

  • @oliver.quiroz
    @oliver.quiroz 2 месяца назад

    How did you install your django and djangoframework in your mac?

  • @asn3348
    @asn3348 2 месяца назад

    more django videos please

  • @aashayamballi
    @aashayamballi 2 месяца назад

    Thank you!

  • @subratkarmacharya8125
    @subratkarmacharya8125 Месяц назад

    more django react contents

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

    Muito obrigado meu chara!!!!

  • @bereketg5609
    @bereketg5609 Месяц назад

    53:16 I feel you😭

  • @mdanishossain026
    @mdanishossain026 Месяц назад

    what is the theme of your VS code???

  • @user-Amankhowal
    @user-Amankhowal 3 месяца назад

    How do you manage to enable Server Side Rendering?

  • @thinzin101
    @thinzin101 2 месяца назад

    it was too perfect

  • @manavshah1844
    @manavshah1844 3 месяца назад +1

    Great🎉

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

    King Pedro 🎉

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

    Can you make a video for chat app system using django? Im stuck in implementing the chat app😢

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

    help so in order to connect django and react i just need to use the corsheaders stuff and the rest framework?

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

    please make more django projects

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

    more django stuff

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

    Awesome

  • @tomahocbc963
    @tomahocbc963 3 месяца назад +1

    please can you add authenticaion, login, logout etc..

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

    WE NEED MORE
    is vite really necessary?

    • @LuisMorales-lu2cm
      @LuisMorales-lu2cm 3 месяца назад

      Not necessary but way faster and more recommended to use vite, I think even in the recent react document it recommends to use vite

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

    You forgot timestamps and you should create actual video sections too

  • @dev-akeel
    @dev-akeel 3 месяца назад

    🤔 I have been watching you for more than a couple of years, why do you put those unnecessary spaces in the jsx? and when prettier tries to format your code you just remove that formatted {" "}.

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

    Django advance course

  • @adamlahchimi-zb9rc
    @adamlahchimi-zb9rc 3 месяца назад

    the linkdin link doesnt work

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

    cool

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

    35:50

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

    Second view 😍first like😇 and first report💀(for nudity)

  • @techug2719
    @techug2719 Месяц назад

    6

  • @techug2719
    @techug2719 Месяц назад

    10

  • @techug2719
    @techug2719 Месяц назад

    3

  • @techug2719
    @techug2719 Месяц назад

    5

  • @techug2719
    @techug2719 Месяц назад

    4

  • @techug2719
    @techug2719 Месяц назад

    2

  • @techug2719
    @techug2719 Месяц назад

    8

  • @techug2719
    @techug2719 Месяц назад

    7

  • @techug2719
    @techug2719 Месяц назад

    9

  • @techug2719
    @techug2719 Месяц назад

    1