Python Django Tutorial - Build A Todo App

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 171

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

  • @giraffes2815
    @giraffes2815 6 років тому

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

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

  • @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 8 років тому

    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

  • @abbyadams7300
    @abbyadams7300 4 роки тому

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

  • @coding_ss632
    @coding_ss632 8 років тому +66

    1:53 :p

    • @tonyagenbroad2196
      @tonyagenbroad2196 8 років тому +4

      that made me laugh out loud when I was watching haha

    • @TraversyMedia
      @TraversyMedia  8 років тому +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 8 років тому +4

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

    • @TraversyMedia
      @TraversyMedia  8 років тому +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 8 років тому +3

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

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

  • @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 8 років тому +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..

  • @ytSpoiler
    @ytSpoiler 8 років тому +4

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

  • @domothepilot
    @domothepilot 7 років тому

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

  • @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 5 років тому

      @@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 5 років тому

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

    • @beatalert123
      @beatalert123 5 років тому

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

  • @hardikmodi8234
    @hardikmodi8234 7 років тому +1

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

  • @ShahnawazSayyad
    @ShahnawazSayyad 7 років тому

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

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

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

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

  • @alexf6248
    @alexf6248 3 роки тому

    Man, did this just help me. Thank you

  • @Floflox
    @Floflox 7 років тому

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

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

  • @codybythesea
    @codybythesea 7 років тому +2

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

  • @hendrjl
    @hendrjl 6 років тому

    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

  • @shubhambiniwale9623
    @shubhambiniwale9623 6 років тому

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

  • @mnop2
    @mnop2 7 років тому +2

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

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

  • @markolivancic
    @markolivancic 6 років тому

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

  • @chesterholt5551
    @chesterholt5551 6 років тому

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

  • @zlatkoiliev8927
    @zlatkoiliev8927 6 років тому

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

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

  • @akofa13039
    @akofa13039 8 років тому +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

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

  • @Colstonewall
    @Colstonewall 8 років тому

    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  8 років тому +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

  • @siddharthsr2000
    @siddharthsr2000 7 років тому

    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.

  • @prasad3673
    @prasad3673 7 років тому +8

    can you make more videos of Django ...

  • @gligom
    @gligom 8 років тому

    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!

  • @CoryTheSimmons
    @CoryTheSimmons 7 років тому

    Try Conda instead of Pip/virtualenv for environment isolation.

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

  • @michaeldicicco6431
    @michaeldicicco6431 7 років тому +2

    This was fantastic.

  • @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 :(

  • @LiaAdzumi
    @LiaAdzumi 5 років тому

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

  • @vic0de
    @vic0de 8 років тому

    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  8 років тому

      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

  • @24junar
    @24junar 7 років тому

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

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

  • @MathieuBourmaud
    @MathieuBourmaud 7 років тому +1

    Very good tutorial as usual ;)

  • @leaoaugusto
    @leaoaugusto 7 років тому +1

    Nice tutorial. Thanks so much!

  • @MHP2738
    @MHP2738 6 років тому

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

  • @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 7 років тому +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!

  • @yashbansal8871
    @yashbansal8871 2 роки тому

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

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

  • @adsbix5337
    @adsbix5337 8 років тому

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

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

  • @naimislamantor3781
    @naimislamantor3781 4 роки тому

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

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

  • @saitaro
    @saitaro 7 років тому

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

  • @giraffes2815
    @giraffes2815 6 років тому

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

  • @kingsleyfelix
    @kingsleyfelix 7 років тому

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

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

  • @saqibhussain1354
    @saqibhussain1354 6 років тому

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

  • @redabakr
    @redabakr 7 років тому

    Thanks, This is an excellent tutorial

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

  • @deerew23
    @deerew23 5 років тому

    This is really helpful!

  • @louiewilson6754
    @louiewilson6754 5 років тому

    Great video!

  • @CarlosRojas-zk1ic
    @CarlosRojas-zk1ic 7 років тому

    This is aCTUALLy cool ! thanks so much

  • @cybex7
    @cybex7 5 років тому

    what is version of your django in this tutorial?

  • @mmathenge5969
    @mmathenge5969 7 років тому

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

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

  • @brunojesus5444
    @brunojesus5444 7 років тому

    Great tutorial, thanks

  • @adamkenton2585
    @adamkenton2585 8 років тому

    What do you use to record your screen ?

    • @TraversyMedia
      @TraversyMedia  8 років тому

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

    • @vic0de
      @vic0de 8 років тому

      Traversy Media kazam is good for Ubuntu

    • @TraversyMedia
      @TraversyMedia  8 років тому +2

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

    • @adamkenton2585
      @adamkenton2585 8 років тому

      I understand you Brad

    • @rajiththennakoon7392
      @rajiththennakoon7392 7 років тому

      exactly..only thing i use windows for screen recording

  • @UCBCteam
    @UCBCteam 7 років тому +1

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

  • @wayandanyaeleco4969
    @wayandanyaeleco4969 6 років тому

    SO USEFUL THANK YOU !!! GODBLESS !

  • @goldilockszone4389
    @goldilockszone4389 8 років тому

    would learn this or Flask for simple todo apps ?

  • @joydeeproychowdhury5353
    @joydeeproychowdhury5353 6 років тому

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

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

  • @frod809
    @frod809 7 років тому

    Thanks for the video.

  • @victorogonyo5617
    @victorogonyo5617 6 років тому

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

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

  • @soubhagyapradhan3624
    @soubhagyapradhan3624 6 років тому

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

  • @sudiptodebu2155
    @sudiptodebu2155 6 років тому

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

  • @Official_TMC
    @Official_TMC 5 років тому +1

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

  • @uditsaurabh2091
    @uditsaurabh2091 6 років тому

    Kindly make a tutorial on Django class based views

  • @34fagomes
    @34fagomes 7 років тому

    So Helpful!! Tks!!

  • @ibex4048
    @ibex4048 7 років тому +2

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

  • @buchdev
    @buchdev 7 років тому

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

  • @humanrights4498
    @humanrights4498 6 років тому

    Thanx bro

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

  • @jiandeng8595
    @jiandeng8595 7 років тому

    how to deploy this app

  • @yalgret
    @yalgret 7 років тому

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

  • @abdullahatif7854
    @abdullahatif7854 4 роки тому

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

  • @meesiphht2769
    @meesiphht2769 7 років тому

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

  • @JacksonWelch
    @JacksonWelch 5 років тому

    Mark Wahlberg is that you?

  • @cruisemissle87
    @cruisemissle87 7 років тому

    That banging upstairs?

  • @victorogonyo5617
    @victorogonyo5617 6 років тому

    Build a social network with django

  • @faresgeek-dz5692
    @faresgeek-dz5692 8 років тому

    plz more django practic
    lick ecomerce
    blog
    social media

    • @horvathlg
      @horvathlg 8 років тому +5

      ...or a grammar checker for my buddy.

    • @faresgeek-dz5692
      @faresgeek-dz5692 8 років тому

      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.

  • @omar66277
    @omar66277 7 років тому

    command prompts??? what is this 1985!!

    • @ndemou
      @ndemou 7 років тому

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