Check out my Complete Django course! dub.sh/NvGboTI
@muhamedsosic12293 жыл бұрын
Some updates, I had problem at 1:20:30, in react-router-dom version 6 there are a few difference now: * A must be used as the child of element If you get this error Matched leaf route at location "/" does not have an element. This means it will render an with a null value by default resulting in an "empty" page * In V6, you can't use the component prop anymore. It was replaced in favor of element : it should be like this:
@ayeshariantegally3422 жыл бұрын
How did you do it to pass the params to the NotePage.js please?
@GameriziMm2 жыл бұрын
@@ayeshariantegally342 If you don't have the fix yet, you need to modify NotePage to use "useParams()" to get the parameters in v6. import React from 'react' import { useParams } from "react-router-dom"; const NotePage = () => { let params = useParams(); return ( Single Note {params.id} ) } The route itself should look like this: which should be wrapped in of course.
@ayeshariantegally3422 жыл бұрын
@@GameriziMm got it thanks though :) ... for me the end part isnt worrking rightly... doesnt update on delete and update except on refresh
@OpenSourceStudent2 жыл бұрын
You're a hero!
@yogeshshrestha1745 Жыл бұрын
Thank you so much, buddy!
@yusufgoren972 жыл бұрын
If someone has problem with 1:26:03 with match, in NotePage use import { useParams } from "react-router-dom"; than const { id } = useParams(); u should be ok then.
@SUPERNOVA-vn8dh Жыл бұрын
savior!
@jordansteinberg98499 ай бұрын
import React from 'react' import { useParams } from 'react-router-dom'; const NotePage = () => { let params = useParams(); return ( Single Note {params.id} ) }
@pablop46 Жыл бұрын
Thanks. A few adjusments needed if you want to follow this tutorial in 2023. I had to use window.location.assign('/'); instead of history.push('/')
@pablop46 Жыл бұрын
Also, took about 3 hours to realize that fetch(`/api/notes/${id} needs to be WITHOUT the last slash "/" to work, so dont use fetch(`/api/notes/${id}/ :D
@harshwarghade43839 ай бұрын
Thanks a lot brother 🙂
@jakubstrzelecki7004 Жыл бұрын
for someone who has problems with BrowserRouter: 1. You need to wrap your routes inside Routes component. 2. You need to use element instead of component. 3. You need to add a component as an element, not a function. Example:
@kachigar8948 Жыл бұрын
Thank you, friend!
@priyadharshinivasudevan515511 ай бұрын
Thank you so much
@ranjaxwolf97252 жыл бұрын
Thank you so much for the wonderful material you make freely available. I've been a Django backend dev for the last ~5 years working on a very large event management platform and recently resigned after covid related cash flow issues resulted in me (and the other devs) not getting paid for several months which has led me into a state of severe anxiety and imposter syndrome. I'm currently upskilling and practicing while looking for new work and your videos are doing well to reduce/calm my anxiety and fear.
@TdadadT9 Жыл бұрын
bro, absolutly the same case :D Even experience
@mannybarnes20533 жыл бұрын
This was so enjoyable, even with all the errors and headscratchers lol. Thank you Dennis! You are a true inspiration.
@DennisIvy3 жыл бұрын
Thank you Manny. The bugs are a pain but I guess that’s the risk of live streaming :p
@vishmapdas78982 жыл бұрын
@@DennisIvy Agree bro 😁 Thanks for providing my first project 😄 although I am only at the django end part now 😅 I will complete the video soon and have a complete web site 😇 Thanks Dennis bro ❤🔥
@sprutch112 жыл бұрын
@@DennisIvy I actually think it makes the learning experience much better. In slick, edited tutorials, I tend to just follow along with whatever the instructor is doing, not really participating in the programming steps. At the same time, the instructor tends to have everything prepared, going too fast through tricky segments. In live streams like this, I'm much more actively participating in the project, looking to fix the same errors you're encountering, and stopping to spot my own. I actively look for livestream tutorials like this, and yours have been the best I've found so far.
@mannybarnes20532 жыл бұрын
@@sprutch11 @Dennis Ivy is the best in my experience with Django tutorials.
@SimonFabcic Жыл бұрын
@@DennisIvy We feel a little less bad, when we see, that we are not alone in this :) And we see, how you are solving the errors. I miss this in many tutorials. Thanks for your effort!
@mrcors39472 жыл бұрын
In react router V6 the "match" prop is no longer passed to the element. To get the id 1:26:00 you should use useParams hook now.
@BattlefieldTV-tp1qy2 жыл бұрын
how i can use it ?
@GameriziMm2 жыл бұрын
@@BattlefieldTV-tp1qy Hey, if you're still having this issue the fix looks like this: import React from 'react' import { useParams } from "react-router-dom"; const NotePage = () => { let params = useParams(); return ( Single Note {params.id} ) } You just remove the {match} from the brackets, and replace it with useParams() which gets any relevant parameters for you.
@BattlefieldTV-tp1qy2 жыл бұрын
@@GameriziMm thanks
@Shanilka.Ariyarathne2 жыл бұрын
@@GameriziMm thanks
@Barry_L2 жыл бұрын
@@GameriziMm import React from 'react' import { useParams } from "react-router-dom"; const NotePage = () => { let {id}= useParams(); return ( Single Note {id} ) } This also works
@StickMan13162 жыл бұрын
i really appreciate you for uploading this django + React note app video. I'm new to Django and I just started learning Python. Now I'm capable of creating a restful API with python. This is a great video to use the learning technique "copy-work". You have got yourself a new subscriber.
@theworldstudy21992 жыл бұрын
If anybody is facing a mistake at 1:28:48 then get rid of the last forward slash in `/api/notes/${noteID}/`. Should be like that: `/api/notes/${noteID}`.
@nischalshakya20152 жыл бұрын
2:34:55 when using defaultValue, the state is not updating when deleting the only single character note Also it doesn't update the state while trying to delete the whole note (greater than 1 character) by selecting whole note and then pressing delete. It has something to do with controlled(value) vs uncontrolled(defaultValue) components.
@GaneshChandra-qh2rc6 ай бұрын
after looking for many many courses i found this as the best one to follow , thanks for the best course
@DenzelHooke2 жыл бұрын
Great tutorial Dennis! Just started learning React and I was worried that Django and React would be a headache to setup but it was surprising to see how easy it was.
@avisheksharma82762 жыл бұрын
I literally learned how to use JSX format and that's all I needed to just use React. Thank you for this awesome project.
@saumojitbhattacharjee7292 Жыл бұрын
For updated nodejs , passing params with match might not work . This is an alternate option for that. import { useParams } from "react-router-dom"; const { id } = useParams();
@believerbethechange45303 жыл бұрын
1:20 We can't use the component prop anymore. It was replaced in favor of element. So Please replace the line 16 in the video to
@believerbethechange45303 жыл бұрын
I:20:55
@DennisIvy3 жыл бұрын
Unfortunately KZbin videos cannot be edited once posted. You can always revert back to react-router-5 or simply update and update to account for the changes
@deemo162 жыл бұрын
Amazing tutorial! Helped me understand both React and Django much better. For those looking to practice skills, a FUN MINI CHALLENGE: put a switch in the Header that switches between light mode and dark mode ;-) Happy coding!
@thrilleracaste400 Жыл бұрын
After all the research I did, I can now finally conclude that this video is one of the best video for Django + React. Thanks a lot Dennis!❤ Keep up the great work.😊
@reddipradeepkumar13335 ай бұрын
Bro is any database used in this video
@gayathrianant51659 ай бұрын
I'm a complete beginner. This makes so much sense!!
@ศิวศิษย์แสงนิกุล Жыл бұрын
i spend my 3 days to findout how to connect react to django finally I have come to an end Thx to u
@yogeshshrestha1745 Жыл бұрын
solution for error 1:26:00 import React, { useState, useEffect } from "react"; import {useParams} from 'react-router-dom' const NotePage = () => { const params = useParams(); let [note, setNote] = useState(null); useEffect(() => { getNote(); }); let getNote = async () => { try { let response = await fetch(`/api/notes/${params.id}`); let data = await response.json(); console.log(data); setNote(data); } catch (error) { console.error("Error retrieving note:", error); } }; return ( {note?.body} ); }; export default NotePage;
@rd685410 ай бұрын
Thank you!!!
@onemanops2 жыл бұрын
Thank you so much, this was exactly what I was looking for. You remind me of some good programmers I worked with in the 90s. Subscribed.
@jimmyopot19723 жыл бұрын
Hey sir, I highly appreciate this video. Integrating Django and React is a highly sought out skill...
Loved it, Didnt know a thing about django and react just followed along and got to know alot thanks dennis
@LNMLucasMasiero3 жыл бұрын
Thank you sosososo much for this tutorials. You teach so well and because of you, i've started to get more into programming web development and network stuff with restapi. You are an inspiration to me. The process in the backend is i think always # DATABASE DB [sql this case] => models [can be used django modelizer or pydantic or dataclasses] # RESTAPI • Routes [url patterns] • Request Type [get post put del] + body if its neccesary [could be mixed with pydantic models or dataclasses, like in FastAPI] • Functionality with the request [if its wanted] • Response [application/json or text/html] Up to now this are 2 separated parts and then its when it comes Serializers or Schemas, that are functions than can pass an Object with attributes [this object from the models above] to be passed to a Dictionary, so its a native pyhon datatype that in this case, instead of dumping it to json, DRF does it automatically with method Response So Bridge would be DATABASE => SERIALIZERS / SCHEMAS => RESTAPI [Django Rest or Fast API]
@multiversityx2 жыл бұрын
Impressive how he was able to concentrate for 3+ hours
@snailprogrammer74832 жыл бұрын
Having a loading issue. For some reason, once I added the links to each individual note (1:30:58ish) and I click on the link. The address bar updates, but the web page wont display the note content until I reload the page. Everything is coded how it is showing in the video. Im confused on why its not live updating.
@kemalkara2386 Жыл бұрын
did you solve the problem ?
@varunsharma7911 Жыл бұрын
@Dennis Ivy If you select all the text and at once and remove it, the state still contains the note body even though we have removed it. So it does not delete that note.
@nikhilbhardwaj60553 жыл бұрын
In V6
@marouaneyoussfi35602 жыл бұрын
thanks brother
@okch4m2 жыл бұрын
And you have to wrap your with that you also need to import from react-router-dom
@scootergirl36622 жыл бұрын
and a bunch of other things. I recommend keeping the the version of react-router-dom he uses in the video.
@oceanview31652 жыл бұрын
@@scootergirl3662 which version did he use ?
@kaikai53562 жыл бұрын
You make a lot less bugs than i usually do.Don't sell yourself short on anything.I've been watching your django tutorials recently
@snailprogrammer7483 Жыл бұрын
Getting the following error when it comes to displaying {noteId} at 1:25:55 Cannot read properties of undefined (reading 'params') TypeError: Cannot read properties of undefined (reading 'params')
@bunchathumbs61942 жыл бұрын
Денис, спасибо за уроки!)
@naturehome20873 жыл бұрын
What a clear and amazing content. Much love and Thank you!
@unizfrhn28033 жыл бұрын
Yo, absolutely amazing live tutorial !!! Thanks for this so much ..... also the wallpaper lol
@visoflo42082 жыл бұрын
This was an amazing tutorial. So chill...
@ankit303432 жыл бұрын
very great tutorial Thank you Dennis It saved me a lot of hours.
@midouwebdev22243 жыл бұрын
As usual, an amazing tutorial Thank you sir !
@grzegorzkalmus36292 жыл бұрын
If you want create project with env inside the same folder, use dot after project name.
@workacc49802 жыл бұрын
I had trouble accessing id around 1:25:25. I fixed it by modifying my NotePage.js to: import React from "react" import { useParams } from "react-router-dom"; const NotePage = () => { const NoteParams = useParams() return ( Single Note {NoteParams.id} ) } export default NotePage
@r125l63 жыл бұрын
Thanks a lot... Your videos are well structured and sophisticated
@fowad272 жыл бұрын
Anyone know how you fix 403 forbidden? around this time: 1:59:15
@fowad272 жыл бұрын
Solution was to log out of admin account
@Franx5702 жыл бұрын
My solution was getting the CSRF cookie and add it to the headers like this: let CSRF = document.cookie.slice(10) let updateNote = async ()=>{ fetch('/api/notes/'+ noteId + '/update/', { method: 'PUT', headers: { "Content-Type":"application/json", "X-CSRFToken": CSRF }, body:JSON.stringify(note) }) }
@MrTeddyBi2 жыл бұрын
@@Franx570 King!
@Benjaminmcp0 Жыл бұрын
@@Franx570 Thanks for this! I ran in to the CSRF 403 too!
@ethos40663 жыл бұрын
Can't express my gratitude for this tutorial, thank you! Also if you could make a tutorial or send a helpful link about how to filter objects when fetching them in react as we would when in django (notes.objects.filter(id=...)) Again, thank you Dennis
@DevBishwasBh2 жыл бұрын
Yeah he is great!
@DevBishwasBh2 жыл бұрын
Wow, that's great. Tutorial Idea: Develop a blog using Next Js and Django Rest Framework with... 1. Authentication and Authorization 2. Commenting Feature 3. Like/Reaction
@getabegaz Жыл бұрын
Thank you Dennis for this amazing tutorial.
@jahanasultan2 жыл бұрын
Thank you very much for this great tutorial👏
@immeatom3 жыл бұрын
Thank you for making this. This is super helpful.
@reezuleanu16767 ай бұрын
2:46:30 You cannot hear the squeaking chair, but i readjusted my own chair and it squeaked, then you just say "sorry for the squeaking chair". WHO ARE YOU, HOW ARE YOU IN MY HOUSE
@dluca182 Жыл бұрын
[edit ] explained at 2:16:00 :) 1:55:00 I'm a bit confused about why Django doesn't need CSRF token. I've used plain django+JS in previous project and react only tested few times without backend I always forgot about CSRF token in django and it had me struggle
@nquanta15483 жыл бұрын
From scratch that's awesome thanks for this video , nice content :)
@prateekmohanty83152 жыл бұрын
Amazing content Dennis . Thank you so much
@kachigar8948 Жыл бұрын
Ace work, man! Thank you very much.
@genericbinary5582 жыл бұрын
Best video on this specific topic 🥰
@mayconblopes_ Жыл бұрын
To avoid the error at 44:03, you can use get_object_or_404 function, from django.shortcuts, like this: from django.shortcuts import get_object_or_404 @api_view(['GET']) def get_note(request, pk): """get a single note""" # note = NoteModel.objects.get(id=pk) note = get_object_or_404(NoteModel, id=pk) serializer = NoteSerializer(note, many=False) return Response(serializer.data)
@bonde6595 Жыл бұрын
It’s really a wonderful tutorial. thanks you sir🔥
@oceanview31652 жыл бұрын
If anyone downgraded to ""react": "^17.0.2", and have encountered dependency conflict when running, (npm install) then do this : 1: Change your src/index.js file : import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; const root = document.getElementById('root'); ReactDOM.render( , root ); 1) Delete node_modules & package-lock-json 2) npm cache clean --force 3) npm install --legacy-peer-deps 4) npm install --force This should fix it. Also, towards the end when crating REST API, if you get forbidden error (403) or your CRUD functionalities don't work : 1) log into your admin page and log out. *** I finished this project with using the same dependencies as he used for this tutorial ***
@mohamedrayenkadhi51342 жыл бұрын
This comment has to be pinned. Have been facing the 403 error for many hours. Still wondering why with logged in admin CRUD don't function well.
@oceanview31652 жыл бұрын
@@mohamedrayenkadhi5134 I am glad you found it helpful 😊.
@TheCodeDealer3 жыл бұрын
Cool Thumbnails man, everything's on point 👌👌 I think I've found my inspiration now lol
@everythingjdm8057 Жыл бұрын
nice video wish was here to watch the stream
@PP-tc1zp2 жыл бұрын
Thank you for course. If you want I can show you how to fix little bug to improve 'updateNote'
@Teruroom3 жыл бұрын
ライブ配信ご苦労様です!頑張ってくださいませ!
@shiningzhang2288 Жыл бұрын
wonderful video,thanks,solved many problems for me
@NinjaGuyDan_3 жыл бұрын
1:57:37 Getting 403 error when trying to update note :( no idea how to fix yet
@mueezkhan2803 жыл бұрын
did you fixed it? i am getting the same error.
@mueezkhan2803 жыл бұрын
getting the error on chrome but not on safari
@mueezkhan2803 жыл бұрын
i just reopened the browser and it started working
@ekkyarmandi3 жыл бұрын
some user suggest me to clear the cookies from the browser
@Saikonautic2 жыл бұрын
@@ekkyarmandi thanks that fixed me up.
@DJenriqez9 ай бұрын
lol thanks, I found so many shitty solutions on web, this is clear and easy, I hope it will work, I will try it later.
@everythingjdm8057 Жыл бұрын
i wish this vid was longer honestly
@michaelbamiloshin16702 жыл бұрын
Awesome, awesome video!! Thanks Dennis!
@shivamathiya8384 Жыл бұрын
at 2:15:26 after creating new note why aren't we saving it? using if serializer.is_valid(): serializer.save()
@techany36252 жыл бұрын
1:17:00 bookmarked error from proxy need to install react-router-dom@5.3.0
@web-dev-zargo Жыл бұрын
YOU ARE THE BEST, MAN!!! I LOVE U 😍😂
@vianniealeazer83 жыл бұрын
I can't create, update or delete notes the build app its gives forbidden error. How do I fix this this
@mickaelrichard72553 жыл бұрын
I have the same issue
@ZZDryno3 жыл бұрын
Clearing cookies fixed it for me.
@vianniealeazer83 жыл бұрын
@@ZZDryno thanks it worked
@ekkyarmandi3 жыл бұрын
@@ZZDryno It also solved my problem! Thanks. But, how cookies affect the API request?
@MuhammadAyaz-gp7xd Жыл бұрын
Live Long Sir. Thank you so much.
@carlmascarenhas41242 жыл бұрын
greate video... very interactive and helpful
@avirajwalunj18342 жыл бұрын
125-70k man this is great video.
@jdcrunchman999 Жыл бұрын
can you please tell me what the "spread operator". (...) means? Is that a part of Node.js, React, or some other part I dont yet know. I'm very weak on React, but fairly strong on Django, so I'm going to need more lessons on how to connect a Django back end to a react front end, any KZbin video references would be most helpful. If any other viewers have some useful links, please respond here, and I'll get them.
@Diego_Cabrera Жыл бұрын
The spread operator is a JavaScript concept. It basically allows you to copy over all the data from an JavaScript object (dictionary in python) to another object. In python this is know as unpack operator (**args).
@jasonlamichhane20192 жыл бұрын
Uncaught TypeError: match is undefined i get this error at 1:26:05 ....... does anyone has any answers regarding this error.
@ayeshariantegally3422 жыл бұрын
You gotta use the 'useParam' hook ;) try researching it, if you need more help, let me know :)
@siddharthpunmiya0705 Жыл бұрын
Hey Dennis when I updated the content from Port 8000 from django ,it is saying forbidden plz can u help me with this
@siddharthpunmiya0705 Жыл бұрын
For those who are facing this issue Logout of the admin panel it will solve the forbidden issue i don't know the logic why but it worked this is tricky. Can anyone explain this thing?
@sridharmallela Жыл бұрын
I am not able to perform update, delete and create operations when i run react app on django server.i am getting 403 error(forbidden) .does anyone have a solution?
@drakata2710 ай бұрын
same
@mrendus3 жыл бұрын
Why you don't using PEP 8 (function names)? Why you don't used just one viewset for notes functionality on backend?
@DennisIvy3 жыл бұрын
I don’t like the PEP8 structure for function names, I prefer camel casing.
@proshivamkushwaha Жыл бұрын
Hi, I'm facing the problem at the time of deployment, I need to run two serves, first run Django Server then run React Server. Also I don't know in witch server I want to setup domain in React or Django. Please suggest me some solution to solve this problem. Thanks
@burel52 жыл бұрын
I'm new to django and I'm willing to learn more, thanks for sharing this work. Also what vs code theme and font-family are you using?
@kakafob2 жыл бұрын
`Github Dark Theme` is using in the VSC.
@EUU1003 жыл бұрын
Can anyone helps please, TypeError: Cannot read properties of undefined (reading 'params') i get that error @ 1:30:00 instead of receiving the data for each note detail using the id
@sayadahmedshaurov86393 жыл бұрын
I always enjoy watching your videos. You make many things sound easier to understand than others. In this stream, although you did not need to cover everything about react, or take much time to cover each related topic, you could have spent more time explaining react hooks. (You did great actually. But you could have shown more examples while explaining hooks.)
@shivamsinghnegi1192 Жыл бұрын
Thanks the tutorial is very helpful ........
@sravansangishetti9752 жыл бұрын
Great Job Dennis
@masterbruculous2 жыл бұрын
Great tutorial, However I have this error, when I let django host my react app, it won't allow me to send a POST request, it said "CSRF Failed: CSRF token missing.". Is there anyway I can fix that? Worked fine when use react port
@joker-jc7ug2 жыл бұрын
Did you find solution to this , please help me if you did
@avirajwalunj18342 жыл бұрын
you have csrf token in form right?? or use csrf exempt in django
@joker-jc7ug2 жыл бұрын
@@avirajwalunj1834 thank you problem solved
@alaminegueye3218 Жыл бұрын
I just finished this tutorial series (React crash course & Django back-end integration) and I think it's just perfect for beginners. Is there any resource or tutorial I could use to deploy this whole full-stack app ?
@Diego_Cabrera Жыл бұрын
I'm working on a video on how I deployed my django app. I hope to have it up in the future, I'll let you know!
@thomasmichaelides2 жыл бұрын
Following along with this tutorial and something strange is happening. When i hit the left arrow button after updating the note, it seems like theres almost a 50/50 chance that the getNotes() api call will be called before the the updateNote() api call meaning that it doesnt show the updated note unless i refresh the page? Any ideas anyone?
@edalynjaguar73502 жыл бұрын
You can turn the handleSubmit function into an async promise to make JavaScript wait for the promise to settle to ensure the update method is called before the page navigates back to the homepage. I done it like so: let handleSubmit = async () => { // Update note await updateNote(); // Ensure the put request is called before the get request await new Promise((resolve, reject) => setTimeout(resolve, 100)); // send user back to the homepage navigate("/"); }; Bear in mind that react dom router has updated since the release of this video so 'history.push' no longer works. Instead import useNavigate from reacter-router-dom, set it as a variable at the top of the notePage function component, eg. let navigate = useNavigate(), and then call it in your handle submit like so: navigate('/'). Hope this helps :)
@Weiner7672 жыл бұрын
@@edalynjaguar7350 Thanks! That fixed it for me. Is this the only way around this problem? And why does he not appear to have this problem?
@edalynjaguar73502 жыл бұрын
@@Weiner767 That's the only solution I found at the time - but I'm still learning. He might have been lucky, and not had the problem during development but could have still encountered the problem when testing.
@pykidie36613 жыл бұрын
hello i have been following your videos and they are really helpful so i was wondering how can i build an api from a abstrct custom user
@allspirituality84717 ай бұрын
Hey dennis quick question after adding react to django, create-read-delete operations on django port 8000 not work what is solution?
@allspirituality84717 ай бұрын
Another level dennis
@codebytaha3 жыл бұрын
Thank you for this, i learned a lot from your channel, your content is really great; I have a question, i tried to use my Django API (in Heroku) and my React App(in Netlify), everything works (all CRUD actions) so i added an image field in my models and they just don't show up (works fine in developement), is there something needed so that image files could be read (like some Nginx stuff maybe)?thank you
@yazhouliu13663 жыл бұрын
heroku does not support image storage,you might need a third party to store user uploaded images
@codebytaha3 жыл бұрын
@@yazhouliu1366 thank you and yes i got that point.but it can keep them for the first few hours . My goal Is just the fact of displaying images just for the sake of the experiment even for a minute
@nootherkyle3 жыл бұрын
love that built from scratch
@ghfudrs93uuu2 жыл бұрын
1:57 are you intentionally trying to make your code hard to debug? Ludiscrous
@thomasvanderven6029 Жыл бұрын
How come that you don't have to do the command `npm run build` when calling your api's (in the NotesListPage.js) in the Django backend?
@Sharaf-eg Жыл бұрын
Hi Dennis Thanks for this great channel, I just have an issue when adding react to django (create-update-delete) does not work it's 403 Forbidden however it's the api is working standalone
@victoronah21583 жыл бұрын
Thanks Dennis this was awesome what's theme are you using on Vscode
@DennisIvy3 жыл бұрын
Atom one dark pro
@victoronah21583 жыл бұрын
@@DennisIvy Thank you very much Dennis
@LearnWithBahman2 жыл бұрын
Do you separate API in your Udemy course ? Thx
@Meshv_patel3 жыл бұрын
Which theme you are using in vs code?
@iloveraplot2 жыл бұрын
Hello Dennis, I look up to this tutorial and model mine project similar just with Class based views ( that part I was watching your other video) , and there I used CustomeUserAcessMixin which extends PermissionRequredMixin, for restrict user by group which they are part of . Now I wanted to start React frtontend part , but at begining when I want to make API calls I got error : ,,too many redirections,, known as redirection loop. ( I think that problem is value ,,next,, of the redirect_field_name parameter from dispatch function of PermisionRequeredMixin). And one more error is there Uncaught Promise (failed to fetch). Can you help me by at least point me in right direction?
@edgarzatarain65352 жыл бұрын
What is your wallpaper it looks really cool
@CP-qy1vc3 жыл бұрын
I'm getting the following error: at the 1:03:55 mark Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
@CP-qy1vc3 жыл бұрын
nvm, figure it out, wait a little later in the video and he will explain it
@ekkyarmandi3 жыл бұрын
Is there any body can help? why this error occur and how to handle it? "POST /api/notes/create/ HTTP/1.1" 405 41
@ekkyarmandi3 жыл бұрын
[Solved]: I just need to remove the backlash from the urls.py for the POST request method, like this /api/notes/create