Комментарии:
Hi Dennis, you have another Django todo app video on your channel. is it totally different from that one?
ОтветитьWhy are we using the rest framework and api. When we can build a todo site with only django.. can anyone tell me the difference ?
ОтветитьAnyone point me to any similar videos to work within the structure of Django RESPT API + Javascript but to additionally integrate OpenAI's text completions to let's say, add a "Assist" button to send the ToDo list item title to OpenAI and to receive and display a response from OpenAI?
Love your videos Dennis. Thank. you for your time.
The year is 2023, and the javascript error with editbtn and the for loop, has been moderated. Now the original code works fine now. `for(let i in list){let editbtn = document.getElementsByClassName('edit')[i] editBtn.addEventListener('click', function(){ editItem(list[i]); }` works fine now in Javascript. Big fan of your videos Dennis! Much love from Nigeria
Ответитьwhen i try to update the task a new task is added to the list. I can't figured the mistake what i done, can anyone help me !
ОтветитьVery thank you!
ОтветитьAmazing
ОтветитьWhat if I wanna deploy the api app only and use my endpoints in another website uploaded on some other platform like netlify?
ОтветитьI love how u try to fix the problems and keep going with the tutorial <3
ОтветитьSomething that I really wanted! You are doing a great job :) Thank you for this content.
ОтветитьWhere have you uploaded your templates?
Ответитьi got my rest Api created and perfectly functional but I do the post method Javascript using fetch() part and it's perfectly written and doesn't give me any errors but it DOES NOT get saved on the database sigh 😫... this ishhh is giving me a big headache...because something that's literally impossible is happening... the url I pass is the endpoint I have on my api for posting stuff (when I post stuff from the django rest framework interface it does work and gets saved) but does not get added on the database from the frontend interface using js... and I've written every single line of code as shown in the video.... the fuction submit does work and run from top to bottom, and zero errors reported... but it just does NOT get added on the database.. 🤷🏽♂️ 🤷🏽♂️ 🤷🏽♂️ No idea... I'm lost and confused and dissaponted asf
ОтветитьThank you so much @Dannis for this session, I just now completed this, growing my skills from here...
ОтветитьHi Dennis. That was explosive. Thanks very much. I have a quick question. Why did you use POST method for Update instead of a PUT method? I am just curious.
Ответитьthanks ! good info
ОтветитьWaaooooooo! I admit that this is one of the best videos I have ever watched. Thanks very much Dennis Ivy
Look forward to watch that of React
This is a great video
Ответитьmy create function worked but i didnt submit my csrf token can anyone explain why?
ОтветитьThank you very much
ОтветитьThanks man you helps me alot to complete my tasks
ОтветитьGreat Explanation as Before
Ответитьthank you
ОтветитьThank you for creating same project in Django without Rest Framework, Django with Rest Framework and React+Django. It helped a lot.
ОтветитьAnother way to solve the event listener being added to only the last item.
for (var i in list){
let editBtn = document.getElementsByClassName('edit')[i]
let item = list[i]
editBtn.addEventListener('click', function(){
editTask(item);
console.log(item);
})
}
I had another idea on the editItem part: put an inline onclick function and pass the current item id as a parameter.
ОтветитьMa mann thank you, this tutorial is so good, dislikes are from haters.
ОтветитьI tried to follow js knowing only python, this has no sence xD
ОтветитьThank you for your wonderful lesson!!!
ОтветитьThank you very much!!! useful tutorial....
ОтветитьHello!
I may have found a easier way to manage the "edit" and "delete" keys.
You can create a function with the id as a input which send the fetch request and stuff.
You can then call it inside the dom using onClick HTML method and pass in the id using template literals.
thank you so much sir
Ответитьwhat are the benefits of using this over a react Django rest type architecture?
Ответитьyou need to update this with the latest js
ОтветитьWhy you didnt use the jinja2 in html?
Ответитьwhy on minute 32 you dindt just do : <button class="btn btn-sm btn-outline-info edit" onclick="edit_item('+data[i].id+')">Edit</button>?
ОтветитьThank you for this amazing tutorial, I have a better understanding of DRF now.
There is an alternative solution for CSRF token that is:
let csrftoken = document.querySelector('input[name="csrfmiddlewaretoken"]').value;
then send this to the fetch header.
thank's a lot, u'v rockd it at all
ОтветитьThanks for sharing... We won't forget to subscribe.
ОтветитьThanks, learned a lot. Opened a pull request ;P Consider looking into it.
ОтветитьLove your django tuts
You just explain it perfectly.
Thanks for the good tutorial. However what you did with the edit and delete event listeners was very poorly explained.
Ответитьwhat is the use of making rest framework in the backend if we can do all the CRUD operation from django-admin panel. Are both different? please reply to me .
Ответитьplease make a tutorial on Django channels
Ответить