Django Tutorial for Beginners – 5 – Views

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






47 responses to “Django Tutorial for Beginners – 5 – Views”

  1. Pauline Karlsson Avatar

    I got a name error; NameError: name 'url' is not defined
    Code in musicurls looks like this:
    url(r'^$', views.index, name='index'),

    Anyone have a clue why?

  2. Aishwarya Dhobale Avatar

    I'm getting error : cannot create can anyone help?

  3. sometype Avatar

    its giving me a NameError index not defined

  4. ahamed Avatar

    you are the best……tttttttttttttt. no compare

  5. Bi Ao Avatar

    Can anyone explain why is
    from . import views but not
    import views ?

  6. Alex Yap Avatar

    bucky you are a life saver, you have no idea how many django tutorials i have watched only to get caught up in all the tech mumbo jumbo, your tutorial is the first to have ever given me hope of ever fully understanding back end programming as you have made it so much easier to understand, thank you!

  7. Afaf ARFAOUI Avatar

    how can i switch from sqlite3 to mysql?

  8. Alexandre & Evelyn Avatar

    tyerror: view must be a callable or a list/tuple in the case of include

  9. Marcus Hines Avatar

    If you're getting Page Not Found error for r'^music' try restarting your server.

  10. lay nadji Avatar

    Clear explanations, good tutorial, thanks buddy !

  11. Vasya Pupkin Avatar

    "you didn't mess up ur computer congratulations"

  12. Adam Avatar

    "Sorry got the black lung" hahaha

  13. Bavishi Hardik Avatar

    when i add new url in website/ file in that time close the runserver and
    error generate "importerror : no module named website"…So what i do??
    please help m…
    i have tried so many time …but doestn't solve this error…

  14. Lorenzo White Avatar


    Ok, I'm seeing in a ton of tutorials for django that says that the 'r' before the string literal in the url patterns is supposed to be a notation that denotes a regular expression. However, according to the Regex documentation (, jump to the backslash plague section), the 'r' is a PYTHON notation that denotes a raw string, not some indicator for a RE

    Why does everyone keep saying that it indicates a RE then?

  15. anant gaurav Avatar

    Bucky, my server is stopping again and again and the most frustrating part is, it is not fixing up! To be particular, I am experiencing this problem when I'm creating "music". Need your help, ASAP!

  16. payman khayree Avatar

    hey what do you call those "r"s? a carrot?

  17. prog man Avatar

    I love your tutorials bro

  18. Steven Rowland Avatar

    python createsuperuser

    will create the login/password for the admin portal

  19. Youssif  Kmayra Avatar

    for the account and password, incase you're using a virtual environment you need to create a super user, just type in you're terminal: python createsuperuser

  20. achal jain Avatar

    cannot import http response

  21. Rahul Nayanegali Avatar

    For admin page, i.e django administration it's asking login id and password.
    how do I open my admin page

  22. Rijumone Choudhuri Avatar

    You're funny. 🙂
    Also, detailed tutorial I had fun following.

  23. avichal chadha Avatar

    i pity on the keyboard !!

  24. Younes PhD Henni Avatar

    2:00 chack out Derek Banas channel for the regex tutorials, they are just awesome.

  25. Ahmed Eid Avatar

    quick note though , the ' r ' does not mean regular expression it mean raw string .

  26. Nick Avatar

    Bucky, you are a legend!

  27. Caio Vital Avatar

    Got a problem if I put "import views" instead of "from . import views"

  28. Guoxin Huang Avatar

    I love the last part. He summed all the things up.

  29. Ria Banerjee Avatar

    I'm getting an error 404! It says "Current URL music didnt match any of theses". I checked, and there is no spelling error or so. Please help?

  30. Rajendra patel Avatar

    what if i want to add new page like music/something
    do i have to add that in music.urls then what will be the index ??
    is it views.something?? and what will be the name ?? different or same as you created?

  31. Prakash Besra Avatar

    help needed :
    First time when run server (by typing 'python runserver' on powershell), it works fine. Now I type ctrl+c to quit. Next time when i try to run server, it doesn't work, a pop up shows up which says "Python has stopped working. A problem caused the program to stop working correctly. Windows will close the problem and notify you if a solution is available [Debug] [Close program]"….can anyone help me?

  32. Benjamin Andrews Avatar

    Nice. Very clear tutorials. Not spoken in "robot speech" as is so often the case.

  33. Ibragim Kadirov Avatar

    AttributeError at /music/
    'tuple' object has no attribute 'get'


  34. Radu Stefan Avatar

    "r" before a string does not mean regular expression, it means "raw" from raw string, so python knows not to interpret eventual special characters (like "n")

  35. jykwok13 Avatar

    great video. thank you

  36. xkaur1 Avatar

    Is this code sample available somewhere on git

  37. selen özek Avatar

    very helpful and clear tutorial. thank you!

  38. Iddo weiner Avatar

    I followed this tutorial closely, copying all steps. At the end when I try looking at the server, it gives me a 404 message (not found). I shut the server down (ctrl+c) and ran it again.. same result. Any ideas what may have went wrong?

  39. Alexis ROLLAND Avatar

    That was a bit lenghty but much clearer than the tutorial on Django's official website!
    Thank you, it helped!

  40. André Benevides Avatar

    after doing the part when i try to run the server (python runserver) i get an error saying that python.exe has stopped working.
    Anyone got this problem and/or know how to fix it?

  41. Carlos96700 Avatar

    My django page keeps timing out whilst making the "music" part. Then if I click the saved bookmark, the site cant be reached. How do I fix this?

  42. Sameer Dubey Avatar

    How do I login in to the admin?

  43. maskawath turzo Avatar

    hey I am getting this error ImportError: No module named 'music.url'

  44. Pradeep kumar reddy Byreddy Avatar

    WOW last one minute is awesome !!!
    Made me to understand whole video in 1 minute
    Thanks Bucky

Leave a Reply

Your email address will not be published. Required fields are marked *