Python Django Tutorial - Build A Todo App

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 171

  • @giraffes2815
    @giraffes2815 5 лет назад

    I'm glad you kept the mishaps in because it helps us understand how to read errors!

  • @Flatron303
    @Flatron303 7 лет назад +6

    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 !

  • @pedromondragon6631
    @pedromondragon6631 7 лет назад +13

    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.

    • @JesusGil90
      @JesusGil90 6 лет назад

      I also recommend using Pycharm IDE

  • @jirikadlec1058
    @jirikadlec1058 6 лет назад

    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.

  • @abbyadams7300
    @abbyadams7300 4 года назад

    I'm glad I'm not the only one that has to adjust the urls routing multiple times.

  • @ryanzwaagstra6606
    @ryanzwaagstra6606 7 лет назад

    @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.

  • @xx482
    @xx482 7 лет назад

    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

  • @LewraAzad
    @LewraAzad 3 года назад

    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

  • @ShahnawazSayyad
    @ShahnawazSayyad 7 лет назад

    Very nice ... you explained with so much clarity and simplicity... keep up your good work.

  • @ytSpoiler
    @ytSpoiler 7 лет назад +4

    Very good tutorial. In my opinion best part is create own 'add form'.

  • @briancrane7634
    @briancrane7634 7 лет назад

    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

  • @domothepilot
    @domothepilot 7 лет назад

    i am new in programming and i understood almost everything. thanks so much for your time. great stuff.

  • @MallikaKhullar
    @MallikaKhullar 7 лет назад

    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.

    • @alexyap3659
      @alexyap3659 7 лет назад

      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

  • @alexf6248
    @alexf6248 2 года назад

    Man, did this just help me. Thank you

  • @hardikmodi8234
    @hardikmodi8234 7 лет назад +1

    this is the tutorial which makes me understood the Django.Thank you very much.

  • @marktwain3083
    @marktwain3083 7 лет назад +12

    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
      @eugenenovikov671 7 лет назад

      спасибо за инфу.

    • @beatalert123
      @beatalert123 4 года назад

      @@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
      @eugenenovikov671 4 года назад

      @@beatalert123 namaste. just use google translate. "thanks for info" it should translate

    • @beatalert123
      @beatalert123 4 года назад

      @@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 😌😇

  • @alexanderbergkvist9224
    @alexanderbergkvist9224 7 лет назад +13

    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

    • @dipeshjain8630
      @dipeshjain8630 6 лет назад

      how did you run this on windows and did you download the zip file and then imported it

    • @JD-oj1hr
      @JD-oj1hr 5 лет назад

      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!

  • @redsnakeintown
    @redsnakeintown 7 лет назад +1

    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..

  • @Floflox
    @Floflox 7 лет назад

    Just what I needed to understand django's basic, thanks a lot !

  • @jerehme_gayle
    @jerehme_gayle 7 лет назад

    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

  • @codybythesea
    @codybythesea 7 лет назад +2

    excellent vid on Django. Maybe to complete the Todo list, we can try to implement a delete button

  • @mnop2
    @mnop2 7 лет назад +2

    Great tutorial.
    Some explanation missing though.
    I think one should do it after going over the Django starting tutorial.

  • @shubhambiniwale9623
    @shubhambiniwale9623 6 лет назад

    Thank you sir! I followed complete tutorial of yours...and it was great!

  • @karthikeyanrajendran6004
    @karthikeyanrajendran6004 6 лет назад

    Nice video. Understood all codes clearly..!

  • @md.alauddinal-amin9842
    @md.alauddinal-amin9842 7 лет назад

    good complete tutorial.. in a nutshell al most everything you have shown..

  • @siddharthsr2000
    @siddharthsr2000 6 лет назад

    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.

  • @Colstonewall
    @Colstonewall 7 лет назад

    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!!

    • @TraversyMedia
      @TraversyMedia  7 лет назад +1

      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

  • @gligom
    @gligom 7 лет назад

    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!

  • @hendrjl
    @hendrjl 5 лет назад

    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

  • @prasad3673
    @prasad3673 7 лет назад +8

    can you make more videos of Django ...

  • @markolivancic
    @markolivancic 6 лет назад

    Love your stuff man!
    Keep up the awesome work you do my friend.

  • @24junar
    @24junar 7 лет назад

    Hi Brad, you are the best! Please make a tutorial of Django rest api with Angular 4. Thanks

  • @zlatkoiliev8927
    @zlatkoiliev8927 6 лет назад

    Awesome tutorial as always! Thank you for your effort on doing these tuts! :)

  • @CoryTheSimmons
    @CoryTheSimmons 7 лет назад

    Try Conda instead of Pip/virtualenv for environment isolation.

  • @coding_ss632
    @coding_ss632 7 лет назад +66

    1:53 :p

    • @tonyagenbroad2196
      @tonyagenbroad2196 7 лет назад +4

      that made me laugh out loud when I was watching haha

    • @TraversyMedia
      @TraversyMedia  7 лет назад +28

      :) 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

    • @abdulelahaljeffery6234
      @abdulelahaljeffery6234 7 лет назад +4

      there is also the dislike-and-leave-without-contributing-any-useful-comment kind of assholes too!

    • @TraversyMedia
      @TraversyMedia  7 лет назад +17

      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!

    • @jebbush2964
      @jebbush2964 7 лет назад +3

      Thank you for the video tutorials @TraversyMedia. Don't mind those who envy you. You are an excellent instructor.

  • @chesterholt5551
    @chesterholt5551 6 лет назад

    Dude, you're an absolute legend. Thank you!

  • @mmathenge5969
    @mmathenge5969 7 лет назад

    Traversy Media thanks, you should make a live tutorial ;)

  • @akofa13039
    @akofa13039 7 лет назад +2

    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

  • @saqibhussain1354
    @saqibhussain1354 6 лет назад

    Can you do a course on TDD as well? Awesome content bro!

  • @ericespino7361
    @ericespino7361 7 лет назад +18

    Shouldn't be better using Python 3.5 instead of Python 2.7. Years passed and we continue to use an "obsolete" version.

    • @everythingisnothing8137
      @everythingisnothing8137 7 лет назад +1

      2.7 is the best version!

    • @empyrerhomann6743
      @empyrerhomann6743 7 лет назад +4

      2.7 is never obsolete ...
      Please know what you say!!!!

    • @Artificial_Intelligence_AI
      @Artificial_Intelligence_AI 7 лет назад +2

      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.

    • @evilface1010101
      @evilface1010101 6 лет назад +2

      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"

    • @alaskacitygirl
      @alaskacitygirl 6 лет назад +3

      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/

  • @mashaandbeer1472
    @mashaandbeer1472 6 лет назад

    Brilliant Tutorial Man!

  • @leaoaugusto
    @leaoaugusto 7 лет назад +1

    Nice tutorial. Thanks so much!

  • @louiewilson6754
    @louiewilson6754 5 лет назад

    Great video!

  • @noidentify3174
    @noidentify3174 5 лет назад +1

    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

    • @DennisIvy
      @DennisIvy 5 лет назад +1

      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)

    • @noidentify3174
      @noidentify3174 5 лет назад +1

      @@DennisIvy thank you so much bruh, im gonna try it

  • @sweinvestidor
    @sweinvestidor 7 лет назад

    Which do you like more, Django or Ruby on Rails?

    • @clyt9636
      @clyt9636 7 лет назад

      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

  • @redabakr
    @redabakr 7 лет назад

    Thanks, This is an excellent tutorial

  • @michaeldicicco6431
    @michaeldicicco6431 7 лет назад +2

    This was fantastic.

  • @brunojesus5444
    @brunojesus5444 7 лет назад

    Great tutorial, thanks

  • @frod809
    @frod809 7 лет назад

    Thanks for the video.

  • @wayandanyaeleco4969
    @wayandanyaeleco4969 6 лет назад

    SO USEFUL THANK YOU !!! GODBLESS !

  • @deerew23
    @deerew23 5 лет назад

    This is really helpful!

  • @victorogonyo5617
    @victorogonyo5617 6 лет назад

    please do a whole course on django on udemy and add features such as login,image processing google maps search admin

  • @LiaAdzumi
    @LiaAdzumi 5 лет назад

    Hi,
    How to create database-driven multiple dropdown menu using django?
    Can you do it?
    Thanks for the tutorial.

  • @CarlosRojas-zk1ic
    @CarlosRojas-zk1ic 7 лет назад

    This is aCTUALLy cool ! thanks so much

  • @ChristopherAdams1
    @ChristopherAdams1 7 лет назад +13

    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

  • @uditsaurabh2091
    @uditsaurabh2091 5 лет назад

    Kindly make a tutorial on Django class based views

  • @kingsleyfelix
    @kingsleyfelix 7 лет назад

    Should i focus on Ruby or Python or PHP (already on this)

  • @saitaro
    @saitaro 7 лет назад

    Thanks for the lesson!
    What accent do you have, is it Boston?

  • @MathieuBourmaud
    @MathieuBourmaud 7 лет назад +1

    Very good tutorial as usual ;)

  • @Sourcedeep1
    @Sourcedeep1 7 лет назад

    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)

  • @vic0de
    @vic0de 7 лет назад

    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?

    • @TraversyMedia
      @TraversyMedia  7 лет назад

      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

  • @UCBCteam
    @UCBCteam 7 лет назад +1

    increase the font size of your text editor, please ... thanks

  • @p2nl
    @p2nl 6 лет назад

    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?

    • @p2nl
      @p2nl 6 лет назад

      its in todos/urls.py

    • @p2nl
      @p2nl 6 лет назад

      I found out what went wrong: I forgot to add a comma at the end of the line above. Sorry.

    • @tezdrive8190
      @tezdrive8190 6 лет назад +1

      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.

    • @oscardavid8717
      @oscardavid8717 6 лет назад

      did you fix it?

    • @oscardavid8717
      @oscardavid8717 6 лет назад

      im using path too , and im stuck :(

  • @assmaal-adawi7896
    @assmaal-adawi7896 6 лет назад

    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?

  • @victorogonyo5617
    @victorogonyo5617 6 лет назад

    Build a social network with django

  • @naimislamantor3781
    @naimislamantor3781 4 года назад

    Hey how can write python code for web without a framework please make a detail video.

  • @sudiptodebu2155
    @sudiptodebu2155 5 лет назад

    mentor we need a complete django project course medium level.plz try to help us

  • @34fagomes
    @34fagomes 7 лет назад

    So Helpful!! Tks!!

  • @Official_TMC
    @Official_TMC 5 лет назад +1

    it looks like the django im using is different from your django

  • @ComptGeorges
    @ComptGeorges 5 лет назад

    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.

  • @abdullahatif7854
    @abdullahatif7854 4 года назад

    Dude, you have to updtae this tutorial by using new django versions.

  • @meesiphht2769
    @meesiphht2769 6 лет назад

    Just another tutorial that really ought to be sound only and no, I never did see the final result. WOT

  • @joydeeproychowdhury5353
    @joydeeproychowdhury5353 6 лет назад

    can we use 'path' instead of 'url'???

  • @cybex7
    @cybex7 5 лет назад

    what is version of your django in this tutorial?

  • @yashbansal8871
    @yashbansal8871 2 года назад

    When i run show tables after doing migration it shows empty set. why?

  • @adsbix5337
    @adsbix5337 7 лет назад

    Thank u so much , i have question about menu bar like mac , how to do that ? i have backbox (ubuntu) !!

  • @goldilockszone4389
    @goldilockszone4389 7 лет назад

    would learn this or Flask for simple todo apps ?

  • @icegreenedits4553
    @icegreenedits4553 5 лет назад

    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?

  • @ibex4048
    @ibex4048 6 лет назад +2

    'todos.apps.TodosConfig', dude from where u got that TodosConfig?? You should have more detailed.

  • @humanrights4498
    @humanrights4498 6 лет назад

    Thanx bro

  • @channachannu
    @channachannu 7 лет назад +1

    I'm getting an error
    "No module named 'MySQLdb' "
    When I tried to run the server

    • @JD-oj1hr
      @JD-oj1hr 5 лет назад

      Me either! Did you ever solve it?

    • @GauravMishra0509
      @GauravMishra0509 4 года назад +1

      bro he fooled you. he used used sqllite3 but has changes the name to mysql in settings.py line no.77
      very cunning

    • @GauravMishra0509
      @GauravMishra0509 4 года назад +1

      @@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

  • @soubhagyapradhan3624
    @soubhagyapradhan3624 6 лет назад

    how to use mysql database which i have already with xampp for php

  • @huxixi4120
    @huxixi4120 6 лет назад

    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

  • @JacksonWelch
    @JacksonWelch 5 лет назад

    Mark Wahlberg is that you?

  • @yanl.3776
    @yanl.3776 6 лет назад

    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"

  • @buchdev
    @buchdev 7 лет назад

    Tu velocidad de descarga es mayor a 4Mb/s, impresionante, aqui en venezuela la mayor es 1Mb/s y muy raro

  • @Bircalences
    @Bircalences 7 лет назад

    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.

  • @yalgret
    @yalgret 6 лет назад

    I was told SQLLite can handle terabytes of data...

  • @cruisemissle87
    @cruisemissle87 7 лет назад

    That banging upstairs?

  • @MohamedAyman-li6rp
    @MohamedAyman-li6rp 7 лет назад

    Hi, Brad,
    Why we get this .pyc after running the server.

    • @jeffrey152
      @jeffrey152 5 лет назад

      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

  • @saikirankummari631
    @saikirankummari631 7 лет назад

    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

    • @tezdrive8190
      @tezdrive8190 6 лет назад

      hey i have the same problem. were you able to solve it?

  • @adamkenton2585
    @adamkenton2585 7 лет назад

    What do you use to record your screen ?

    • @TraversyMedia
      @TraversyMedia  7 лет назад

      I use Camtasia on Windows. This tutorial was done in a VM

    • @vic0de
      @vic0de 7 лет назад

      Traversy Media kazam is good for Ubuntu

    • @TraversyMedia
      @TraversyMedia  7 лет назад +2

      Ill check that out. Its really the only thing holding me back from going full on Linux

    • @adamkenton2585
      @adamkenton2585 7 лет назад

      I understand you Brad

    • @rajiththennakoon7392
      @rajiththennakoon7392 7 лет назад

      exactly..only thing i use windows for screen recording

  • @jiandeng8595
    @jiandeng8595 6 лет назад

    how to deploy this app

  • @giraffes2815
    @giraffes2815 5 лет назад

    why is it todos.apps.TodosConfig at 22:40 ?

  • @MHP2738
    @MHP2738 5 лет назад

    at minute 11:51 i get this error ModuleNotFoundError: No module named 'todos'

  • @faresgeek-dz5692
    @faresgeek-dz5692 7 лет назад

    plz more django practic
    lick ecomerce
    blog
    social media

    • @horvathlg
      @horvathlg 7 лет назад +5

      ...or a grammar checker for my buddy.

    • @faresgeek-dz5692
      @faresgeek-dz5692 7 лет назад

      krumplilovag hhhh
      yes why not...

  • @GoofyChaiLoverGirl
    @GoofyChaiLoverGirl 7 лет назад

    1.11.4

  • @FootballForThePeople
    @FootballForThePeople 3 года назад

    Doing a BA in web development and the lecture is so poor. Everytime I come for you instead.

  • @ihorslavinskyi9823
    @ihorslavinskyi9823 7 лет назад

    I am new in programming, and i understand nothing. Can you recommend to me some textbook about Django?

    • @ronborneo1975
      @ronborneo1975 7 лет назад +2

      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.

    • @ihorslavinskyi9823
      @ihorslavinskyi9823 7 лет назад

      Ok

  • @ara7546
    @ara7546 7 лет назад

    lol so easy to build a website with django...

    • @devilmanscott
      @devilmanscott 7 лет назад

      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.

    • @techstacker5361
      @techstacker5361 7 лет назад

      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?