My suggestion for future videos like this one is to show fully functional project/website that we are going to build throughout tutorial on the beginning of the video, so it may be more exciting following along :) Other than that, thanks, awesome as always !
All new people wanting to learn django, first go to another video and install django with a virtual environment, because Brad doesnt do it, then you can come back and continue watching the lesson, which is great, but you may want to install the virtual environment first.
Nice hands-on tutorial! I liked that your code did not always work from the start and that you experienced various errors. I like how you explained the reason for each error and how to fix it.
@Traversy Media... This was an absolutely amazing guide. I am new to both Python and Django. You made so much extremely clear and easily understood. Thank you so much for your time. You even showed how to troubleshoot a little. I ran into a few mistakes on my own doing and was able to work through them in the same fashion you worked through yours. Thanks again.
I am very happy that you have done a video on Python Django .. Awesome .. I have learned JS by watching your videos .. Thanks a lot , you inspired me to learn Javascript
Brad Many thanks for another excellent video! I've been one of your students both here and on U for a year or so. I'll give you the same compliment that I always wanted to hear from my customers in my engineering career. You do good work! 86
Hey Brad, thanks for these awesome videos! Just one suggestion: it would be so great if you could incorporate some explanation with the video. For example, when you're doing the "def __str__(self): return self" bit, it would have been nice to understand what __str__ is actually.
you probably already know this by now but if i understand correctly (mind you, i'm new to django) the __str__() function is a built-in django function that when defined creates a string representation of your object
@@eugenenovikov671 definitely would agree with you only if I could understand what you have written :) The community would appreciate if we all communicated in a common language :) Cheers!
@@eugenenovikov671 too much effort for information buddy. I'd pass it! Thanks for the tip.. I never knew Google Translate could do that 😆 That enlightenment feeling 😌😇
I can't get the request to install for the def index on the views.py file. For some reason Pycharm does not like it. Can only access localhost:8000 and the admin page. Please help!
You can open any code editor by shotcuts , in the project folder type atom . This will open atom on the project folder, this works for other text editors too..
Wow this was a great tutorial a lot better than some paid sites! Easy to follow and understand. Please do another Django tutorial maybe expanding this project user registration/ login/ and a profile page would really great addition. Thank you so much for the excellent cont
Awesome.. i saw both the tutorials.. In this one the view and add functionality is very easy. Can U make a video for the Update n delete segments please.
Very nice tutorial! Only thing I would've changed is putting the header and footer in index.html, then using {% extend 'index.html' %} in your other templates. . .And I wouldn't use hard coded URL's in the templates either. Name them in urls.py, then in the templates use . Anyways, thank you!!
Yeah I figured a layout was a better than what I did with the partials. I almost changed it but said screw it. Its easy enough for people to figure out
Hi, Nice videos and good work! You can tell what is your favorite web dev "stack"? What you will choose for front-end and what for back-end if you will start a new project? Thank you!
Hello , i know is to late. But i really really love your Channel for free Tutorials. Hihi btw , i have watch many of your video and i say thanks for It. Keep sharing
:) Some youtube commenters are just stuck up assholes that want to prove everyone wrong. Fortunately I seem to get the best and most respectable ones though, so I'm happy about that
Ah yes, I got one here. And honestly I think its the same douchbag in all my videos. I get 1 - 2 dislikes. Its like dude, your not paying for it so unless it is absolutely unbearable why dislike? and LEAVE SOME FEEDBACK so I can fix it!
if i will start learning web development as a back-end developer .. which framework you recommend me to learn .. django or nodejs .. i am good in dealing with both python and javascript .. thanks in advance
I don't know much but Python 2.7 still comes with the latest mac OSX (high sierra) as the unique python version installed (I think you can also install python 3 but you can't remove python 2.7) so it has to be because they consider that is not obsolete yet.
Python3 was released in 2008 or 2009 and the community was very resistant since it was not backwards compatible with Python2. There were some significant syntax changes. For example, in Python2 the following code ... print "Hello, World" is completely legal. However, in Python3 this would return an error... as the correct syntax is ... print("Hello, World") You can see how this would be extremely difficult to maintain in even the smallest of projects. With that said, many packages still support Python2 and it has taken some time for some to get on board with Python3. The community is making great steps in adopting Python3 over the next few years but Python2 is by no means, "Obsolete"
2.7 is currently being deprecated and will no longer be maintained as of 2020. Anyone who's afraid to use the word 'obsolete' is being overly sensitive 😜 pythonclock.org/
nice video, how to build view deatils for each data ? example if click "to do list one" or " to do list two" i got a paga that containt detail information about them not CRUD page
Retrieve the item in the view and pass it into the template like this: def itemDetail(request, obj): item = Item.objects.get(id=obj) context = {'item':item} return render(request, 'app/template.html, context) Pass in the item id into the url: path(''item/'/, views.itemDetail)
I had to use True instead of true for created_at = models.DateTimeField(default=datetime.now, blank=True) stackoverflow.com/questions/30095032/nameerror-name-true-is-not-defined
just do atom . in the terminal to open atom with the current folder in it. thanks for the tutorial. do u just go with the flow while making tutorials or do u prepare and pre record vedios?
I usually just prepare the application or something that resembles the app ill be building and then do a run through. I dont usually need to edit unless I really mess up. I do prepare the powerpoint presentations much more than the coding
Great Tutorial. I work in a newer version of pyton and django and I'm half way the tutorial and get stuck to this syntax error: url('^details/(?P\w{0,50})/$', views.details) In the newer version the r at the beginning is not used anymore. What went wrong?
I have one issue : at 48:00 roughly. My posts won't add. I thought there could be an issue with add.html or veiws but I have no errors, no crashes, it just won't add, like a submit button isn't working. I have no idea why. I copied your code from the start until the end. I am using Django v1.11.7. Could the problem be there? Do I need to downgrade to 1.10? Or there is a workaround? Cheers.
when I run pip install Django, it says"Cannot fetch index base URL pypi.python.org/simple/ Could not find any downloads that satisfy the requirement django.No distributions at all found for django"
Nice tutorial. I tried to follow using atom.io but I think it sucks, it can't see the object names in imported py modules, so it can't help with the syntax. I even installed atom-django packages, but they didn't help either. I'll return to use PyCharm. Coding python with PyCharm is x times faster than with atom, because it handles the syntax without pain. Atom is good with html/css/js but not with python, imho.
It's a compilated python file used by python to run faster. Read more here (of course in case you still don't know what it is 1y later) : stackoverflow.com/questions/2998215/if-python-is-interpreted-what-are-pyc-files
It's not smart to begin with frameworks. Instead, you should try learning the language behind Django which is Python. There are plenty of books for Python.
A very simple one, once you start needing login, forms, chat, picture, sessions, front-end, API and many more, you start to run into a lot of shortcomings, some come with the framework, but require a lot of customisation. It's a nice framework, but like most larger frameworks, it's hide a lot of shortcoming, also abstract, too much magic for my liking, also it's quite hard to customise it, not as bad as Rails, but still annoying. I prefer Flask a less invasive Python framework.
Yep, and that's why you need to write down your list of requirements before you pick a framework. Does it provide you what you need out of the box? If not, how many extensions / libraries do you need, and are they already available or do you need to build them yourself?
I'm glad you kept the mishaps in because it helps us understand how to read errors!
My suggestion for future videos like this one is to show fully functional project/website that we are going to build throughout tutorial on the beginning of the video, so it may be more exciting following along :)
Other than that, thanks, awesome as always !
All new people wanting to learn django, first go to another video and install django with a virtual environment, because Brad doesnt do it, then you can come back and continue watching the lesson, which is great, but you may want to install the virtual environment first.
I also recommend using Pycharm IDE
Nice hands-on tutorial! I liked that your code did not always work from the start and that you experienced various errors. I like how you explained the reason for each error and how to fix it.
I'm glad I'm not the only one that has to adjust the urls routing multiple times.
@Traversy Media... This was an absolutely amazing guide. I am new to both Python and Django. You made so much extremely clear and easily understood. Thank you so much for your time. You even showed how to troubleshoot a little. I ran into a few mistakes on my own doing and was able to work through them in the same fashion you worked through yours.
Thanks again.
I am very happy that you have done a video on Python Django .. Awesome ..
I have learned JS by watching your videos .. Thanks a lot , you inspired me to learn Javascript
Come on. Make an updated version of react django todo app for us. We really need this who are trying to learn django. I love your teaching style
Very nice ... you explained with so much clarity and simplicity... keep up your good work.
Very good tutorial. In my opinion best part is create own 'add form'.
Brad Many thanks for another excellent video! I've been one of your students both here and on U for a year or so. I'll give you the same compliment that I always wanted to hear from my customers in my engineering career. You do good work! 86
i am new in programming and i understood almost everything. thanks so much for your time. great stuff.
Hey Brad, thanks for these awesome videos! Just one suggestion: it would be so great if you could incorporate some explanation with the video.
For example, when you're doing the "def __str__(self): return self" bit, it would have been nice to understand what __str__ is actually.
you probably already know this by now but if i understand correctly (mind you, i'm new to django) the __str__() function is a built-in django function that when defined creates a string representation of your object
Man, did this just help me. Thank you
this is the tutorial which makes me understood the Django.Thank you very much.
Instead of running atom and opening your project folder, you could simply run "atom ." in your terminal while being in your project's folder.
спасибо за инфу.
@@eugenenovikov671 definitely would agree with you only if I could understand what you have written :) The community would appreciate if we all communicated in a common language :) Cheers!
@@beatalert123 namaste. just use google translate. "thanks for info" it should translate
@@eugenenovikov671 too much effort for information buddy. I'd pass it! Thanks for the tip.. I never knew Google Translate could do that 😆 That enlightenment feeling 😌😇
Took a noob like me 3 long days to get through this xD including getting all the installs to work.. But damn good tutorial :D
how did you run this on windows and did you download the zip file and then imported it
I can't get the request to install for the def index on the views.py file. For some reason Pycharm does not like it. Can only access localhost:8000 and the admin page. Please help!
You can open any code editor by shotcuts , in the project folder type atom .
This will open atom on the project folder, this works for other text editors too..
Just what I needed to understand django's basic, thanks a lot !
Wow this was a great tutorial a lot better than some paid sites! Easy to follow and understand. Please do another Django tutorial maybe expanding this project user registration/ login/ and a profile page would really great addition. Thank you so much for the excellent cont
excellent vid on Django. Maybe to complete the Todo list, we can try to implement a delete button
Great tutorial.
Some explanation missing though.
I think one should do it after going over the Django starting tutorial.
Thank you sir! I followed complete tutorial of yours...and it was great!
Nice video. Understood all codes clearly..!
good complete tutorial.. in a nutshell al most everything you have shown..
Awesome.. i saw both the tutorials..
In this one the view and add functionality is very easy.
Can U make a video for the Update n delete segments please.
Very nice tutorial! Only thing I would've changed is putting the header and footer in index.html, then using {% extend 'index.html' %} in your other templates. . .And I wouldn't use hard coded URL's in the templates either. Name them in urls.py, then in the templates use .
Anyways, thank you!!
Yeah I figured a layout was a better than what I did with the partials. I almost changed it but said screw it. Its easy enough for people to figure out
Hi,
Nice videos and good work!
You can tell what is your favorite web dev "stack"? What you will choose for front-end and what for back-end if you will start a new project?
Thank you!
Hello , i know is to late. But i really really love your Channel for free Tutorials. Hihi btw , i have watch many of your video and i say thanks for It. Keep sharing
can you make more videos of Django ...
Love your stuff man!
Keep up the awesome work you do my friend.
Hi Brad, you are the best! Please make a tutorial of Django rest api with Angular 4. Thanks
Awesome tutorial as always! Thank you for your effort on doing these tuts! :)
Try Conda instead of Pip/virtualenv for environment isolation.
1:53 :p
that made me laugh out loud when I was watching haha
:) Some youtube commenters are just stuck up assholes that want to prove everyone wrong. Fortunately I seem to get the best and most respectable ones though, so I'm happy about that
there is also the dislike-and-leave-without-contributing-any-useful-comment kind of assholes too!
Ah yes, I got one here. And honestly I think its the same douchbag in all my videos. I get 1 - 2 dislikes. Its like dude, your not paying for it so unless it is absolutely unbearable why dislike? and LEAVE SOME FEEDBACK so I can fix it!
Thank you for the video tutorials @TraversyMedia. Don't mind those who envy you. You are an excellent instructor.
Dude, you're an absolute legend. Thank you!
Traversy Media thanks, you should make a live tutorial ;)
if i will start learning web development as a back-end developer .. which framework you recommend me to learn .. django or nodejs .. i am good in dealing with both python and javascript .. thanks in advance
Can you do a course on TDD as well? Awesome content bro!
Shouldn't be better using Python 3.5 instead of Python 2.7. Years passed and we continue to use an "obsolete" version.
2.7 is the best version!
2.7 is never obsolete ...
Please know what you say!!!!
I don't know much but Python 2.7 still comes with the latest mac OSX (high sierra) as the unique python version installed (I think you can also install python 3 but you can't remove python 2.7) so it has to be because they consider that is not obsolete yet.
Python3 was released in 2008 or 2009 and the community was very resistant since it was not backwards compatible with Python2. There were some significant syntax changes.
For example, in Python2 the following code ...
print "Hello, World"
is completely legal.
However, in Python3 this would return an error... as the correct syntax is ...
print("Hello, World")
You can see how this would be extremely difficult to maintain in even the smallest of projects.
With that said, many packages still support Python2 and it has taken some time for some to get on board with Python3. The community is making great steps in adopting Python3 over the next few years but Python2 is by no means, "Obsolete"
2.7 is currently being deprecated and will no longer be maintained as of 2020. Anyone who's afraid to use the word 'obsolete' is being overly sensitive 😜 pythonclock.org/
Brilliant Tutorial Man!
Nice tutorial. Thanks so much!
Great video!
nice video, how to build view deatils for each data ? example if click "to do list one" or " to do list two" i got a paga that containt detail information about them not CRUD page
Retrieve the item in the view and pass it into the template like this:
def itemDetail(request, obj):
item = Item.objects.get(id=obj)
context = {'item':item}
return render(request, 'app/template.html, context)
Pass in the item id into the url:
path(''item/'/, views.itemDetail)
@@DennisIvy thank you so much bruh, im gonna try it
Which do you like more, Django or Ruby on Rails?
Vitor Vezani given that ror could implement all this stuff in just under 3 minutes using scaffolding, ror is the clear winner in that area
Thanks, This is an excellent tutorial
This was fantastic.
Great tutorial, thanks
Thanks for the video.
SO USEFUL THANK YOU !!! GODBLESS !
This is really helpful!
please do a whole course on django on udemy and add features such as login,image processing google maps search admin
Hi,
How to create database-driven multiple dropdown menu using django?
Can you do it?
Thanks for the tutorial.
This is aCTUALLy cool ! thanks so much
I had to use True instead of true for created_at = models.DateTimeField(default=datetime.now, blank=True)
stackoverflow.com/questions/30095032/nameerror-name-true-is-not-defined
Yep ur right it seems it was corrected automatically by his IDE in the video
you should use timezone.now() from the "from django.utls import timezone"
thank you
had the same error. thanks!
Kindly make a tutorial on Django class based views
Should i focus on Ruby or Python or PHP (already on this)
Thanks for the lesson!
What accent do you have, is it Boston?
Very good tutorial as usual ;)
I often feel like website built with django are slow (at least on my system - maybe it's specific to the ways my computer and system is configured)
just do atom . in the terminal to open atom with the current folder in it.
thanks for the tutorial.
do u just go with the flow while making tutorials or do u prepare and pre record vedios?
I usually just prepare the application or something that resembles the app ill be building and then do a run through. I dont usually need to edit unless I really mess up. I do prepare the powerpoint presentations much more than the coding
increase the font size of your text editor, please ... thanks
Great Tutorial. I work in a newer version of pyton and django and I'm half way the tutorial and get stuck to this syntax error:
url('^details/(?P\w{0,50})/$', views.details) In the newer version the r at the beginning is not used anymore. What went wrong?
its in todos/urls.py
I found out what went wrong: I forgot to add a comma at the end of the line above. Sorry.
hey i am having the same problem. I am stuck here. I still can't find my mistake.
And in the newer version I use path instead of url.
did you fix it?
im using path too , and im stuck :(
Hi! Great tutorial but I keep getting an error that no module called "todos.url" (around the 10 minute mark). How do I troubleshoot that?
Build a social network with django
Hey how can write python code for web without a framework please make a detail video.
mentor we need a complete django project course medium level.plz try to help us
So Helpful!! Tks!!
it looks like the django im using is different from your django
I have one issue : at 48:00 roughly. My posts won't add. I thought there could be an issue with add.html or veiws but I have no errors, no crashes, it just won't add, like a submit button isn't working. I have no idea why. I copied your code from the start until the end. I am using Django v1.11.7. Could the problem be there? Do I need to downgrade to 1.10? Or there is a workaround?
Cheers.
Dude, you have to updtae this tutorial by using new django versions.
Just another tutorial that really ought to be sound only and no, I never did see the final result. WOT
can we use 'path' instead of 'url'???
what is version of your django in this tutorial?
When i run show tables after doing migration it shows empty set. why?
Thank u so much , i have question about menu bar like mac , how to do that ? i have backbox (ubuntu) !!
thanks bro
would learn this or Flask for simple todo apps ?
flask
Hello! I have been stuck for hours in creating the details page.. I get "Page not found (404)" and "127.0.0.1:8000/todo/details/1"... any suggestions?
'todos.apps.TodosConfig', dude from where u got that TodosConfig?? You should have more detailed.
Thanx bro
I'm getting an error
"No module named 'MySQLdb' "
When I tried to run the server
Me either! Did you ever solve it?
bro he fooled you. he used used sqllite3 but has changes the name to mysql in settings.py line no.77
very cunning
@@JD-oj1hr bro he fooled you. he used use d sqllite3 but has changes the name to mysql in settings.py line no.77
very cunning
how to use mysql database which i have already with xampp for php
Sorry, but I really wonder that why after "python manage.py startapp todos" I don' t have the apps.py file??? I use Django 1.8
Mark Wahlberg is that you?
when I run pip install Django, it says"Cannot fetch index base URL pypi.python.org/simple/
Could not find any downloads that satisfy the requirement django.No distributions at all found for django"
Tu velocidad de descarga es mayor a 4Mb/s, impresionante, aqui en venezuela la mayor es 1Mb/s y muy raro
Nice tutorial.
I tried to follow using atom.io but I think it sucks, it can't see the object names in imported py modules, so it can't help with the syntax. I even installed atom-django packages, but they didn't help either.
I'll return to use PyCharm. Coding python with PyCharm is x times faster than with atom, because it handles the syntax without pain. Atom is good with html/css/js but not with python, imho.
Try VsCode it works like a charm
I was told SQLLite can handle terabytes of data...
That banging upstairs?
Hi, Brad,
Why we get this .pyc after running the server.
It's a compilated python file used by python to run faster. Read more here (of course in case you still don't know what it is 1y later) : stackoverflow.com/questions/2998215/if-python-is-interpreted-what-are-pyc-files
hey I got struck at 36:36 where we are passing (id=id) as get objects..but it is showing an error as pagenot found
hey i have the same problem. were you able to solve it?
What do you use to record your screen ?
I use Camtasia on Windows. This tutorial was done in a VM
Traversy Media kazam is good for Ubuntu
Ill check that out. Its really the only thing holding me back from going full on Linux
I understand you Brad
exactly..only thing i use windows for screen recording
how to deploy this app
why is it todos.apps.TodosConfig at 22:40 ?
at minute 11:51 i get this error ModuleNotFoundError: No module named 'todos'
plz more django practic
lick ecomerce
blog
social media
...or a grammar checker for my buddy.
krumplilovag hhhh
yes why not...
1.11.4
Doing a BA in web development and the lecture is so poor. Everytime I come for you instead.
I am new in programming, and i understand nothing. Can you recommend to me some textbook about Django?
It's not smart to begin with frameworks. Instead, you should try learning the language behind Django which is Python. There are plenty of books for Python.
Ok
lol so easy to build a website with django...
A very simple one, once you start needing login, forms, chat, picture, sessions, front-end, API and many more, you start to run into a lot of shortcomings, some come with the framework, but require a lot of customisation.
It's a nice framework, but like most larger frameworks, it's hide a lot of shortcoming, also abstract, too much magic for my liking, also it's quite hard to customise it, not as bad as Rails, but still annoying.
I prefer Flask a less invasive Python framework.
Yep, and that's why you need to write down your list of requirements before you pick a framework. Does it provide you what you need out of the box? If not, how many extensions / libraries do you need, and are they already available or do you need to build them yourself?