Videos notes provide by Justin Yang. Justin followed this video and asked me to link up the notes he took so here they are :) docs.google.com/document/d/1eu_ImYL21W905howHsyW782BPxKVJp9vz5nlJYB2G2E
could you explain me this 2 line: form = TaskForm(request.POST) ==> icant understand the meaning of it (line 14 views.py) form = TaskForm(instance=task) ==> what are this instances which you are using in the code?(line 25 views.py)
@@navidabasi TaskForm is a modelForms django class (forms.ModelForm).... TaskForm(request.POST) basically creates a TaskForm object with all the information from the HTML form fed in. when we say instance=task, it creates a ModelForm object, with data from the Django Database pre fed in. "Instance" implies "at that point in time". You can check it out yourself... just add a print statement below the lines and do: print(str(form)) and in the console, cmd prompt for me, you'll get something like this: Inside If //(added a print statement right inside the if block in updateTask view) Title: Complete: It has a label, an input field etc... This will go in the HTML file as programmed.
Hey.. Im Indonesian, a beginner for Python django. you've given me systematical way to start the project. although I finally made it, Im still learning n keep watching yours to understand the steps. Thanks a lot Dennis..
For all the days I am following and learning from you, one thing I have noticed is the 3C's that makes your contents stand out i.e. concreteness , clarity, and clear. Thank you for all the all work you put in bringing such outstanding content. Your channel is just getting better with time, Top-notch Quality!
@@rockysingh2200 Javascript can handle everything on the client-side, and it would be more responsive. Also, it would be easier to implement because you don't need to send data up and down using get and post requests.
I ran away from Django to flask because the tutorials I used were all complicated... now I'm back to Django cause of your simple tutorials... Thank you
Hello from Russia! I have been learning python for about 1 year, yhis is my first coding experience. But still didn't start making things like that because I didn't learn any framework at all. Maybe I was afraid of starting using frameworks, they seemed complecated. But step by step I finished this tutorial and liked it very much. I definately will start your Crash Course, thanks a lot!
Dennis, not only this RUclips presentation is awesome, but I am also purchasing your Django class later on today. Your clarity and amazing presentation / teaching skills is priceless !!!!! I almost started to give up on where to turn for a proper Django tutorial until I found yours that MADE SENSE !!!!!! By the way - I have already purchased your course.
Teaching Django via projects makes me understand very well. Thank you. Am looking forward to learn how to pass variables and conditions in views to meet the logic of the app.
Great vid! For any absolute beginners out there, read “Python Crash Course” by Eric Matthes. The ‘Web Application’ section goes into detail from scratch (slowly and explains every line of typed code) and lets you set up your first webapp successfully. After creating a super basic ‘forum’ webapp with topics and entries, you’ll be able to follow along with this vid much better 👍
I am loving this. Django is finally starting to make sense. Will be doing your longer crash course next. Coming from PHP background (and Visual Basic), this is awesome and so much better! Thanks man! Keep up the great work!
Еее бой, все так просто объяснил. Недавно оставил на английском комент к твоему последнему видео, всегда думал - имя такое, сто пудов говорит на русском, но такой свободный английский, что аж засомневался
hey thank you for your awesome mini project on django. and request please keep making awesome project on django and new ideas and techniques. thank you.
Im new to programming, so im new to python too, so its difficult for me to understand object oriented programming, i get lost really easy, but thanks for this tutorial, now im going to trying to reverse engeneer this ♥
Hi there. I just have a question: @15:30 when you passing the model task into template by a for loop, why the date, and completed didn’t display? Thanks for sharing your knowledge.
@@Nicolae_163 Hi Nicolae! The reason is because of the function def __str__(self) which returns only one field: title. If you want to see more fields, just concatenate it with the others.
Thank you Dennis, it's all new to me as a beginner but this video made me easy to understand. The app looks good and thanks for the tutorial. I have a query regarding this it is that how could we add user login to this application.
In update field. When I enter data it is not updating new data to db instead showing the old data in list page with wierd url . Can someone help me with this
I am very glad and blessed to watch your tutorials, these helped me in desperate times. i want to request you to work with bootstrap modals. like click view from a table to show its data in pop up modal and other CRUD operations instead of redirect to separate pages.
Thanks Denis.. thumbs up. You lectures are really great and insightful... A quick one, whats the function of the *attrs* in your form files and also whats the function of the __str__ function in your models
Hi Denis, Great Tutorial. Right now, As you click on the update or Delete button, control is routed to another form/page. I was wondering if you could show how to implement the same using the Bootstrap's Modal Plugin?
Hi Dennis, thanks for a great tutorial. I also just signed up for your complete Django course. One question I had: If I want to include tags to classify the to-do items, I can include them as separate model with many:many relationship. This allows user to select multiple tags when creating a to-do item. This works fine; however, what if we also want to give user the choice to CREATE new tags (in addition to selecting existing ones) when creating a To-Do entry?
Interestingly enough, When updating, despite following instructions to the letter, my update function creates a new object. Using django 3.1.3 Any help would be nice. thanks though.
Update: I have figured out where error was at. In my update_task.html, I noticed I had the value "/" in the action parameter in my form, so it would go to the index method hence creating a new task all together as it was processed by the index method. It was like a eureka moment. haha. I can actually say I am learning! Thanks Dennis. Suggestion: Maybe you could do more videos with the more updated versions of django in the coming months of the year.
Hello Dennis! Great video! Maybe you can tell me how to make a model for creating a task template and share such a template? that is, for example, I create the task "lorem Ipsum" and put it in a conditional separate place, from where I can share this task with another user, and he will copy it to himself and put on your stack. Did you have idea? Google didn't help me...((
I updated the code with if else, here it is. Still have the error "Cannot filter a query once a slice has been taken." Here is the modified code - def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) search_input = self.request.GET.get('search-area') or '' if 's' in search_input: # if search_input: context['instances'] = context['instances'].filter( Q(instance_name__icontains=search_input) | Q(instance_id__icontains=search_input) | Q(instance_type__istartswith=search_input) | Q(public_ip__icontains=search_input) | Q(private_ip__icontains=search_input) | Q(instance_state__icontains=search_input) | Q(region__icontains=search_input) ) context['search_input'] = search_input return context else: context = super().get_context_data(**kwargs) ins = Instances.objects.all() paginator = Paginator(ins, self.paginate_by) page = self.request.GET.get('page') try: ins_per_page = paginator.page(page) except PageNotAnInteger: ins_per_page = paginator.page(1) except EmptyPage: ins_per_page = paginator.page(paginator.num_pages) context['instances'] = ins_per_page return context
@Dennis Ivy My code isn't working half way thru the tutorial. It says no module named "tasks". I've looked in settings.py and I feel like I've done close to everything to retrace my steps. I am using a bit different version (3.03) and also using Atom. Is there something that I am not doing right?
I have made such an app using your methid above... Can you please tell how to delete the task object straight by pressing delete button instead of directing the user to another page.
In the views, have the context say: context = { 'tasks':tasks } My issue was that my context looked like this (it said task instead of tasks): context = { 'task':tasks }
Can you give a general framework if I have a database of items and I want to push them out into the web app at a certain time base on the time from data
The tutorial is good, but it gets confusing tbh, around create item. The confusing part is the approach it follows first method = post in list.html then the if statement in views. Was doing this before learning the basics of django. SO FOR ANYONE WATCHING THIS, DO LEARN THE BASICS OF DJANGO FIRST.
Thanks for the recommendation :) The purpose of the video was to show CRUD operations in django so I didn't want to spend to much time on styling since that wasn't the point.
At 19:42 can you please explain what do you mean by base url path? which url are you talking about? the directory to the html file or to the urls.py folder
@@DennisIvy that would be great. actually, a todo app (restapi) with react front end would be enough for me. I know front end and to some extent backend with templates but it's rest APIs that get me confused.
At the 'Create Item' section it stops working for me. For me it doesn't create the item even tho I followed all the steps. Also the submit type of input is just a submit button and now a field of text. I even did form.title. I am not sure if it just doesn't save my values or if the submit input type changed.
Videos notes provide by Justin Yang. Justin followed this video and asked me to link up the notes he took so here they are :)
docs.google.com/document/d/1eu_ImYL21W905howHsyW782BPxKVJp9vz5nlJYB2G2E
could you explain me this 2 line:
form = TaskForm(request.POST) ==> icant understand the meaning of it (line 14 views.py)
form = TaskForm(instance=task) ==> what are this instances which you are using in the code?(line 25 views.py)
thanks justin
@@navidabasi TaskForm is a modelForms django class (forms.ModelForm).... TaskForm(request.POST) basically creates a TaskForm object with all the information from the HTML form fed in.
when we say instance=task, it creates a ModelForm object, with data from the Django Database pre fed in. "Instance" implies "at that point in time".
You can check it out yourself... just add a print statement below the lines and do:
print(str(form))
and in the console, cmd prompt for me, you'll get something like this:
Inside If
//(added a print statement right inside the if block in updateTask view)
Title:
Complete:
It has a label, an input field etc... This will go in the HTML file as programmed.
Thanks for adding !! Extremely useful resource
Thanks Justin! That's really helpful!
I've been for like a month watching tutorials about Django and that is the best one
Hey.. Im Indonesian, a beginner for Python django. you've given me systematical way to start the project.
although I finally made it, Im still learning n keep watching yours to understand the steps.
Thanks a lot Dennis..
nyari channel indo yg update soal django susah bener
For all the days I am following and learning from you, one thing I have noticed is the 3C's that makes your contents stand out i.e. concreteness , clarity, and clear.
Thank you for all the all work you put in bringing such outstanding content.
Your channel is just getting better with time, Top-notch Quality!
almost dropping django moving to flask then suddenly I found this amazing video tutorial. boom! done todo list. thank you so much!
That's amazing! Glad I kept it simple enough. Once you get through the learning curve django can really be an amazing tool :)
@@TechandcoffeeKe it would probably make more sense to do a calculator in JavaScript
@@Ivcota why?
@@rockysingh2200 Javascript can handle everything on the client-side, and it would be more responsive. Also, it would be easier to implement because you don't need to send data up and down using get and post requests.
@@Ivcota is it possible in django? Like without sending requests to the server it updates in the browser itself
Got my day started by completing this small project 😃
And it feels so good now 😊
I ran away from Django to flask because the tutorials I used were all complicated... now I'm back to Django cause of your simple tutorials... Thank you
Thanks amazing to hear! I’m honored to hear that my tutorials were able to help you with that :)
Hello from Russia! I have been learning python for about 1 year, yhis is my first coding experience. But still didn't start making things like that because I didn't learn any framework at all. Maybe I was afraid of starting using frameworks, they seemed complecated. But step by step I finished this tutorial and liked it very much. I definately will start your Crash Course, thanks a lot!
Awesome to Hear! Glad I kept it simple enough :) What part of Russia? My family left Keiv in 1990 and my wife's family is from Moscow.
@@DennisIvy I'm living now in Saint-Petersburg, but I was born in Naberezhniye Chelny (Набережные Челны).
Saint-Petersburg is a beautiful city :) My wife and I might visit next summer, Last time was 2014.
Dennis, not only this RUclips presentation is awesome, but I am also purchasing your Django class later on today. Your clarity and amazing presentation / teaching skills is priceless !!!!! I almost started to give up on where to turn for a proper Django tutorial until I found yours that MADE SENSE !!!!!! By the way - I have already purchased your course.
Teaching Django via projects makes me understand very well. Thank you. Am looking forward to learn how to pass variables and conditions in views to meet the logic of the app.
Great tutorial Dennis I was moving to flask and some friends talk me about you and guess what I will keep on Django thanks alot
Are you still going at it?
@@KevinTempelx this if possible any progress updates mate?
Thanks a lot ! I have now all the basic understanding to build a complete site
Great vid! For any absolute beginners out there, read “Python Crash Course” by Eric Matthes. The ‘Web Application’ section goes into detail from scratch (slowly and explains every line of typed code) and lets you set up your first webapp successfully. After creating a super basic ‘forum’ webapp with topics and entries, you’ll be able to follow along with this vid much better 👍
I am loving this. Django is finally starting to make sense. Will be doing your longer crash course next. Coming from PHP background (and Visual Basic), this is awesome and so much better! Thanks man! Keep up the great work!
Glad to hear that!
Денис, замечательный английский.
Спасибо за тутор, подписался
Thank you for the easy yet helpful tutorial! ✨
Thank you so much : ) For a beginner in Django like me this was the perfect starting point.
Thanks man I was designing the prototype and I felt really stuck. This is a savior
Thanks Dennis, your tutorials are really helpful for me!!!
Thanks Denis. This tutorial just gave me a head start into app building. I hope to learn from you as I move along.👍
Еее бой, все так просто объяснил. Недавно оставил на английском комент к твоему последнему видео, всегда думал - имя такое, сто пудов говорит на русском, но такой свободный английский, что аж засомневался
00:00 - Introduction
1:40 - Create project
3:00 - Migrate database & create user
5:05 - Create app
5:50 - URL Routing
8:30 - Templates
9:45 - Create Model (Task)
13:25 - Render data (Tasks) in template
15:10 - Model Form
19:25 - Create Item
22:00 - Update Item
29:20 - Delete Item
34:45 - Cross out complete items
34:05 - Style template
hai dennis, i love your channel. after we create this app, what your recommend to the next app?
Thank you Dennis for the informative content! Please keep up teaching Django through projects.
Great tutorial! You make things easy to understand, which is really helpful for beginners like me. Thank you!
hey thank you for your awesome mini project on django. and request please keep making awesome project on django and new ideas and techniques. thank you.
This is an incredibly helpful tutorial. Thanks so much!
Hi Ivy, me gusto mucho tu curso, felicitaciones
Thanks for making this vid! Very informative and helpful for a beginner like myself.
Im new to programming, so im new to python too, so its difficult for me to understand object oriented programming, i get lost really easy, but thanks for this tutorial, now im going to trying to reverse engeneer this ♥
best video on django so far
nice, didnt know django was so powerfull...its like laravel but with python! cooll
Yes you can do a lot with django :)
Hi there.
I just have a question: @15:30 when you passing the model task into template by a for loop, why the date, and completed didn’t display?
Thanks for sharing your knowledge.
@@Nicolae_163 Hi Nicolae! The reason is because of the function def __str__(self) which returns only one field: title. If you want to see more fields, just concatenate it with the others.
Thank you! I hope you could make more videos like this.
Superb! Congratulations on your wonderful tutorial.
Dennis, once again you ROCK !!!!!!!
Nice tutorial, I'm way more faster learning Django through your videos.
:)
me tooo! thanks dennis
12:18 gotta leave it here, will come back later :)
did you come back?
Thanks! A separate example for forms inline would be very much in demand as tutorial.
Are you referring to "Inline formsets"
Hi @@DennisIvy ! Yes I mean Inline formsets.
Great stuff for beginners. Your channel is awesome
Thanks Mr Dennis lvy for best and useful videos 👌
Thank you Dennis, it's all new to me as a beginner but this video made me easy to understand. The app looks good and thanks for the tutorial.
I have a query regarding this it is that how could we add user login to this application.
Brilliant stuff, easy to follow
Thank you, I had fun doing this.
Clear and simple
Hey Hi Dennis, really like the approach and way you did this from scratch..thanks a lot,, subscribing you Guru 🙏🏽 from India
In update field. When I enter data it is not updating new data to db instead showing the old data in list page with wierd url . Can someone help me with this
Thumbs up for easy section access
Thanks, bro for the video! A really helpful video.
Thank you for making this video.
My pleasure Ashok :)
Awesome Tutorial ....Thank you
Well explained everything
I am new to this guys channel and its LIT ! you just got asubscriber
Appreciated :)
@@DennisIvy I have a question Should I learn HTML CSS and Javascript (Front end) then go to Django or backend in general
I am very glad and blessed to watch your tutorials, these helped me in desperate times. i want to request you to work with bootstrap modals. like click view from a table to show its data in pop up modal and other CRUD operations instead of redirect to separate pages.
Thanks Denis.. thumbs up. You lectures are really great and insightful...
A quick one, whats the function of the *attrs* in your form files and also whats the function of the __str__ function in your models
great tutorial dennis
Perfect refresher for Django
Крутой видос. Спасибо. Про аутентификацию и чат буду ждать видосы)
Nice. You really did a great job!
Hi Denis, Great Tutorial. Right now, As you click on the update or Delete button, control is routed to another form/page. I was wondering if you could show how to implement the same using the Bootstrap's Modal Plugin?
ABSOLUTELY AN AWESOME VIDEO
Hi Dennis, thanks for a great tutorial. I also just signed up for your complete Django course. One question I had: If I want to include tags to classify the to-do items, I can include them as separate model with many:many relationship. This allows user to select multiple tags when creating a to-do item. This works fine; however, what if we also want to give user the choice to CREATE new tags (in addition to selecting existing ones) when creating a To-Do entry?
Interestingly enough, When updating, despite following instructions to the letter, my update function creates a new object. Using django 3.1.3
Any help would be nice. thanks though.
Update: I have figured out where error was at. In my update_task.html, I noticed I had the value "/" in the action parameter in my form, so it would go to the index method hence creating a new task all together as it was processed by the index method. It was like a eureka moment. haha.
I can actually say I am learning! Thanks Dennis.
Suggestion: Maybe you could do more videos with the more updated versions of django in the coming months of the year.
@@victormungai OH MAAAN, thank you SOOO much. I was trying to figure out what's the problem during 2 hours. You saved my day, bro!
this is excellent. Thank you!
Hello Dennis! Great video! Maybe you can tell me how to make a model for creating a task template and share such a template? that is, for example, I create the task "lorem Ipsum" and put it in a conditional separate place, from where I can share this task with another user, and he will copy it to himself and put on your stack.
Did you have idea? Google didn't help me...((
I updated the code with if else,
here it is. Still have the error
"Cannot filter a query once a slice has been taken."
Here is the modified code -
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
search_input = self.request.GET.get('search-area') or ''
if 's' in search_input:
# if search_input:
context['instances'] = context['instances'].filter(
Q(instance_name__icontains=search_input) |
Q(instance_id__icontains=search_input) |
Q(instance_type__istartswith=search_input) |
Q(public_ip__icontains=search_input) |
Q(private_ip__icontains=search_input) |
Q(instance_state__icontains=search_input) |
Q(region__icontains=search_input)
)
context['search_input'] = search_input
return context
else:
context = super().get_context_data(**kwargs)
ins = Instances.objects.all()
paginator = Paginator(ins, self.paginate_by)
page = self.request.GET.get('page')
try:
ins_per_page = paginator.page(page)
except PageNotAnInteger:
ins_per_page = paginator.page(1)
except EmptyPage:
ins_per_page = paginator.page(paginator.num_pages)
context['instances'] = ins_per_page
return context
Keep up the great work man!
@Dennis Ivy
My code isn't working half way thru the tutorial. It says no module named "tasks".
I've looked in settings.py and I feel like I've done close to everything to retrace my steps. I am using a bit different version (3.03) and also using Atom. Is there something that I am not doing right?
I'm having the same issues. Just scrolling through the comments to see if anyone has found any solution for this issue
just subscribed. Great tutorial Thanks
I have made such an app using your methid above...
Can you please tell how to delete the task object straight by pressing delete button instead of directing the user to another page.
nice video and excellent explanations
Man loved this ❤️🙏
you're my teacher. thx
:)
Around 15:03, I have the for loop set up but the actual tasks don't show on the todo list. Any suggestions?
In the views, have the context say:
context = {
'tasks':tasks
}
My issue was that my context looked like this (it said task instead of tasks):
context = {
'task':tasks
}
Thankyou so much! It was very helpful! :)
Can you give a general framework if I have a database of items and I want to push them out into the web app at a certain time base on the time from data
The tutorial is good, but it gets confusing tbh, around create item. The confusing part is the approach it follows first method = post in list.html then the if statement in views. Was doing this before learning the basics of django. SO FOR ANYONE WATCHING THIS, DO LEARN THE BASICS OF DJANGO FIRST.
exactly!!
Thanks a lot man! Good Tutorial
Let's say for the delete functionality, you would not like to redirect to another page for confirmation, how would your code change?
Instead of .btn-danger you can use .btn-warning
And what about styling update_task.html and delete.html?
Thanks for the recommendation :) The purpose of the video was to show CRUD operations in django so I didn't want to spend to much time on styling since that wasn't the point.
Спасибо! Отличное видео
пожалуйста :)
Nice JOB.👍
Amazing tutorial
At 19:42 can you please explain what do you mean by base url path? which url are you talking about? the directory to the html file or to the urls.py folder
Can you please show us how to use bootstraps and implement it in this project ?
Thank you so much brother!
Why all tutorials forget/don't use .(period) after app name
Django-admin startproject todo .
Good job! Thanks bro!
Min 41:13 only get the submit button without title, with withe rectangle and complete
17:00 wait a minute.. you import forms from django.. and then you import ModelForm from django.forms??
I just saw it and I'm like WHAAAAATTT????
Doesn't really matter, you can do just do the later thing or both
@@animeshsingh4290 details matter
Great... Please make a video on Instagram clone using django
Wow thanks
Could you please make a simple Django social network
(Ex: Instagram, Twitter ..etc clone)
Adding Vue + vuetiffy would be a great plus
On my "To do list" ;) lol. It's gonna be 1 of about 5 more projects I'll be releasing in the coming months.
@@DennisIvy thanks
awesome. please do :)
@@DennisIvy that would be great. actually, a todo app (restapi) with react front end would be enough for me. I know front end and to some extent backend with templates but it's rest APIs that get me confused.
nice project, this wiil help me a lot :)
Great Video. Love from india
Will this video work for the new 4.0 django?
Hello sir
I am getting this when i print the 2 task which you printed
To Do List
Task object (1)
Task object (2)
At the 'Create Item' section it stops working for me. For me it doesn't create the item even tho I followed all the steps. Also the submit type of input is just a submit button and now a field of text. I even did form.title. I am not sure if it just doesn't save my values or if the submit input type changed.
its so beautiful! Thanks you
do we have to create superuser for every new project
You help me so much! Thanks very much! New subs here \o/ thanks again.
Hi Dennis I did not understood the dynamic urls at 23:41 could you explain or give any reference .
Well Explained Dennis. Great Job. But, I can't delete items (unable to get submit button after clicking on delete)
need help?