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
:) 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!
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 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..
@@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 😌😇
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
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.
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
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
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
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)
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
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
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.
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!
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?
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
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/
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.
:-) I totally get your feeling. Heck command prompts (CLI's) are even more old-fashioned than that (like in 1965 instead of 1985). However make no mistake: fashion has nothing to do with functionality. Both the GUI and the CLI have their role their strengths and their weaknesses. Heavily graphical oriented programs from every part of the spectrum (like AutoCad and Minecraft) have a CLI. There's a reason. Invest time in the CLI and you'll find the reason (just skip the awful windows command prompt -- all the ugliness of a CLI and none of its powers -- bash and the GNU utils are a grate start that I know of and I hear good words about power shell but haven't tried it). It worths repeating anyway: don't let fashion dictate such choices.
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 !
I'm glad you kept the mishaps in because it helps us understand how to read errors!
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.
@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
I'm glad I'm not the only one that has to adjust the urls routing multiple times.
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.
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
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..
Very good tutorial. In my opinion best part is create own 'add form'.
i am new in programming and i understood almost everything. thanks so much for your time. great stuff.
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 😌😇
this is the tutorial which makes me understood the Django.Thank you very much.
Very nice ... you explained with so much clarity and simplicity... keep up your good work.
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
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
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.
Man, did this just help me. Thank you
Just what I needed to understand django's basic, thanks a lot !
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
excellent vid on Django. Maybe to complete the Todo list, we can try to implement a delete button
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
Thank you sir! I followed complete tutorial of yours...and it was great!
Great tutorial.
Some explanation missing though.
I think one should do it after going over the Django starting tutorial.
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!
Love your stuff man!
Keep up the awesome work you do my friend.
Dude, you're an absolute legend. Thank you!
Awesome tutorial as always! Thank you for your effort on doing these tuts! :)
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
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
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?
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
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.
can you make more videos of Django ...
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!
Try Conda instead of Pip/virtualenv for environment isolation.
Nice video. Understood all codes clearly..!
good complete tutorial.. in a nutshell al most everything you have shown..
This was fantastic.
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,
How to create database-driven multiple dropdown menu using django?
Can you do it?
Thanks for the tutorial.
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
Hi Brad, you are the best! Please make a tutorial of Django rest api with Angular 4. Thanks
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?
Very good tutorial as usual ;)
Nice tutorial. Thanks so much!
at minute 11:51 i get this error ModuleNotFoundError: No module named 'todos'
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!
When i run show tables after doing migration it shows empty set. why?
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"
Thank u so much , i have question about menu bar like mac , how to do that ? i have backbox (ubuntu) !!
thanks bro
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?
Hey how can write python code for web without a framework please make a detail video.
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 for the lesson!
What accent do you have, is it Boston?
why is it todos.apps.TodosConfig at 22:40 ?
Should i focus on Ruby or Python or PHP (already on this)
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
Can you do a course on TDD as well? Awesome content bro!
Thanks, This is an excellent tutorial
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)
This is really helpful!
Great video!
This is aCTUALLy cool ! thanks so much
what is version of your django in this tutorial?
Traversy Media thanks, you should make a live tutorial ;)
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
Great tutorial, thanks
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
increase the font size of your text editor, please ... thanks
SO USEFUL THANK YOU !!! GODBLESS !
would learn this or Flask for simple todo apps ?
flask
can we use 'path' instead of 'url'???
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
Thanks for the video.
please do a whole course on django on udemy and add features such as login,image processing google maps search admin
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
how to use mysql database which i have already with xampp for php
mentor we need a complete django project course medium level.plz try to help us
it looks like the django im using is different from your django
Kindly make a tutorial on Django class based views
So Helpful!! Tks!!
'todos.apps.TodosConfig', dude from where u got that TodosConfig?? You should have more detailed.
Tu velocidad de descarga es mayor a 4Mb/s, impresionante, aqui en venezuela la mayor es 1Mb/s y muy raro
Thanx bro
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
how to deploy this app
I was told SQLLite can handle terabytes of data...
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
Mark Wahlberg is that you?
That banging upstairs?
Build a social network with django
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.
command prompts??? what is this 1985!!
:-) I totally get your feeling. Heck command prompts (CLI's) are even more old-fashioned than that (like in 1965 instead of 1985). However make no mistake: fashion has nothing to do with functionality. Both the GUI and the CLI have their role their strengths and their weaknesses. Heavily graphical oriented programs from every part of the spectrum (like AutoCad and Minecraft) have a CLI. There's a reason. Invest time in the CLI and you'll find the reason (just skip the awful windows command prompt -- all the ugliness of a CLI and none of its powers -- bash and the GNU utils are a grate start that I know of and I hear good words about power shell but haven't tried it). It worths repeating anyway: don't let fashion dictate such choices.