Login

Lost your password?
Don't have an account? Sign Up

Python Django Tutorial for Beginners

Python Django Tutorial for Beginners – Learn Django for a career in back-end development. This Django tutorial teaches you everything you need to get started.
– Get the complete Django course (zero to hero):
– Subscribe for more Django tutorials like this:

Other resources:
Python Tutorial for Beginners:
MySQL Tutorial for Beginners:

Want to learn more from me? Check out these links:
– Courses:
– Twitter:
– Facebook:
– Blog:

TABLE OF CONTENT
0:00:00 – Introduction
0:00:58 – Prerequisites
0:01:38 – How to Take this Course
0:02:40 – Getting Started with Django
0:03:19 – What is Django?
0:06:08 – How the Web Works
0:10:32 – Setting Up the Development Environment
0:12:33 – Creating Your First Django Project
0:18:44 – Using the Integrated Terminal in VSCode
0:22:05 – Creating Your First App
0:25:36 – Writing Views
0:27:27 – Mapping URLs to Views
0:32:10 – Using Templates
0:36:19 – Debugging Django Applications in VSCode
0:44:11 – Using Django Debug Toolbar
0:48:37 – Building a Data Model
0:49:21 – Introduction to Date Modeling
0:52:00 – Building an E-Commerce Data Model
0:56:35 – Organizing Models in Apps

#Django #Python

Django is the most popular framework for quickly building production-grade backends with Python. That's why a lot of companies use it and are looking for developers with Django skills. If you know Python and are looking for a career in backend development, you must have Django on your resume.

https://www.educational.guru

42 comments

    1. Sandhya Kodithyala

      how to fix this error Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: ‘C:\Python39\Scripts\pipenv.exe’ -> ‘C:\Python39\Scripts\pipenv.exe.deleteme’ while installing django

  1. Robert Merritt

    Hi Mosh, this is awesome, as usual! I plan to enroll in your full course as a monthly subscriber, but just wanted some clarification on the 10 hour course length advertised in the YouTube video vs the 5 hours indicated on your site. Are there other courses that make up this one, or is it just an approximation for how long it would take to complete the 5 hours of video content? Looking forward to more of your course.

  2. Phillip Gilligan

    To all those coming in and using vscode on windows, when setting your interpreter path, its in C:UsersUser.virtualenvsstorefront-XXXscriptspython , not binpython. Obviously substitute “User” with your username, and “XXX” with your env.

    This also doubles up for those looking for the “bin” directory when hes showing where its at in file explorer, its in “scripts”.

    Update: it seems for the python virtual env in terminal on vscode there seems to have been an update on windows. Now when you go to select it will show you the name of the virtual env you are trying to select in ()’s so you can be sure. Inside the parentheses will be the name of the folder you started the virtual env in. Pretty cool.

    1. Glenn

      Here’s what I did and what worked for me on Windows (took 20mins to resolve ?) : So opening the command palette from View and adding the interpreter path didn’t work for me. Although the PipEnv interpreter was added, the global interpreter was still highlighted. Even the settings.json file wasn’t showing for me at first.

      So I closed VS Code and reopened it by navigating to the storefront folder location in cmd (cd ) and then ran “code .” command to open the project in vs code. The settings.json file now showed up in the project directory but it was empty so I added this equivalent line for python.pythonPath used by Mosh: “python.defaultInterpreterPath”:”“. When inserting the path to the virtual env interpreter, make sure the you use double backslashes ‘\’ to specify the path eg. “C:\Users\\.virtualenvs\storefront-XXXX\Scripts\python” and save this settings.json file.

      Now restart your project in VS Code the same way and open the terminal. If you’re on windows then you’ll might get an error in the terminal that’s something on the lines of “restricted.. “. To solve this I followed what @Abul Hasnat Shohag said: go to Windows Powershell (search powershell on taskbar and run as administrator) and run this line “Set-ExecutionPolicy Unrestricted” enter and then “Y”. now run vscode terminal again. It finally worked from here on and I could run python manage.py runserver to fire up the django server 🙂

  3. Jack Tembo

    Have been waiting for this course for 2 months now since you told us that you are preparing a Django course. This is the only Django course I needed on earth. I really wanted to learn from you alone. Thanks so much Mosh.

  4. Sagediaries

    I celebrate you Mosh. Always wanted to get started on programming. I bought tonnes of books and wasted years but could never really get started. Now am on my way to learning thanks to you. I have rediscovered my interest and am enjoying every step!

  5. MattDaGangsta

    My first video of yours, your ability to teach this framework in a linear fashion that actually MAKES SENSE cant be found anywhere else. Saved me a bunch of time and hassle for this project I have coming up. Thanks a lot!

  6. DONP

    Thanks Mosh! You seem to have a talent for hitting the key points just deep enough to enable understanding and experimentation. I’m interested in more info on a comment you make about templates. You mention that nowadays people use Python to return data, not html. Is that because people are now passing data to tools like React, or is there something else happening that I don’t know about.

  7. Justas Nom

    great tutorial, really easy to follow along!

    I have a quick question though:
    when someone says that disadvantage of Django is that it can only process one request at a time… what does that exactly mean?
    does that mean that if several users click on a link, some of them might get a slight delay?

  8. Sebastian Hebold

    For anyone who has complications with installing the debug_toolbar in django:
    After the debug_toolbar is added to the `INSTALLED_APPS` inside the `settings.py` file, the url start point has to be configured in the `urls.py` file, as described at 45:35.
    However, I had to adapt the way the debug_toolbar is added to the `urlpatterns`, since `import debug_toolbar` showed me an error: `Import “debug_toolbar” could not be resolved`.
    I removed the `import debug_toolbar` from the top and changed the path(..)-entry of the `urlpatterns`-array in the following way:
    Instead of
    `path(‘__debug__/’, include(debug_toolbar.urls))`
    I used
    `path(‘__debug__/’, include(‘debug_toolbar.urls’))` // Note the single quotation marks, denoting a string object, around the argument of the include(..)-function.

    This resolved the issue for me. I assume there was a change in how apps are or can be referenced inside the `urlpatterns`-array, since the installation guide for the toolbar has changed from what is seen in the video to the page I could view, when writing this comment. Good luck, to anyone who ctrl-f’s this comment :D.

  9. Beauty N Style With Halima

    I love Mosh’s videos. I have learned Python, Javascript and Html by his videos.
    Mosh can you make a video on Flutter please? Because I can’t understand any other tutorials except yours.

  10. Devi Varaprasad

    I am waiting for this course from you sir.finally you are made this.from last one year i am learning the programming languages that are made by you.those are out standing and explanation is beautiful.

  11. Patricia Sullera

    Hi, Mosh! This is a great tutorial and I’ve been following you the whole time but I didn’t have an extra directory of .vscode with the settings.json on it. Btw, i’m on Windows 10. What might be the problem? Maybe I skipped something or what? Thanks a lot in advance!

    1. Kyle Christian

      @Marcelo Ecco I substituted Script for bin, and it did not work. I am still missing the extra directory of VS Code. I’m using Windows 11, but I can’t imagine something this drastic would be a result of that.

    2. Kordian Caplazi

      check if when you open the terminal in VS Code it is not opening powershell (ps) if so switch to cmd, then it opened the virtual environment even though I didn’t get the extra directory with the settings.json

  12. Michel Schweinsberg

    Thanks for this man. I have a few courses that are like 10 hours but they seem a little overwhelming to start with. But I love your stuff. Really gets me up and going. Someday I might actually have a nicer place to live, and a nicer car and better life because of channels like this.

Leave a Comment

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

*
*