title
Python Django Tutorial for Beginners
description
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): https://bit.ly/3E7Iq4d
- Subscribe for more Django tutorials like this: https://goo.gl/6PYaGF
Other resources:
Python Tutorial for Beginners: https://youtu.be/_uQrJ0TkZlc
MySQL Tutorial for Beginners: https://youtu.be/7S_tz1z_5bA
Want to learn more from me? Check out these links:
- Courses: https://codewithmosh.com
- Twitter: https://twitter.com/moshhamedani
- Facebook: https://www.facebook.com/programmingwithmosh/
- Blog: https://programmingwithmosh.com
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.
detail
{'title': 'Python Django Tutorial for Beginners', 'heatmap': [{'end': 948.89, 'start': 758.427, 'weight': 0.885}, {'end': 1243.872, 'start': 1162.574, 'weight': 0.907}, {'end': 1465.527, 'start': 1427.345, 'weight': 0.762}, {'end': 1955.704, 'start': 1868.368, 'weight': 0.805}], 'summary': 'This tutorial covers an ultimate django course from basics to advanced concepts, enabling students to build production-grade backends for web and mobile apps using python and django, taught by mosh hamadani. it introduces the basics and benefits of django, including its popularity, essential features, and high average annual salary for django developers. additionally, it covers setting up the development environment, dependency management, django course and apps, url configuration, templates, debugging, django debug toolbar, data modeling, e-commerce entity modeling, and organizing django apps.', 'chapters': [{'end': 147.739, 'segs': [{'end': 65.049, 'src': 'embed', 'start': 34.523, 'weight': 0, 'content': [{'end': 40.747, 'text': "Everything you need to know about Django is in one place in the right order, so you don't need to jump back and forth between random tutorials.", 'start': 34.523, 'duration': 6.224}, {'end': 49.374, 'text': "I'm Mosh Hamadani and I've taught millions of people how to advance their software engineering skills through my YouTube channel and online school CodeWithMosh.com.", 'start': 41.208, 'duration': 8.166}, {'end': 53.437, 'text': "If you're new here, be sure to subscribe as I upload new videos all the time.", 'start': 49.895, 'duration': 3.542}, {'end': 55.399, 'text': "Now, let's jump in and get started.", 'start': 53.878, 'duration': 1.521}, {'end': 65.049, 'text': "you Let's talk about what you need to know to take this course.", 'start': 55.781, 'duration': 9.268}], 'summary': 'Mosh hamadani provides comprehensive django tutorials on youtube and codewithmosh.com.', 'duration': 30.526, 'max_score': 34.523, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg34523.jpg'}, {'end': 103.792, 'src': 'embed', 'start': 76.32, 'weight': 1, 'content': [{'end': 84.669, 'text': 'You should also know the basics of relational databases, so you should be familiar with concepts such as tables, columns, primary and foreign keys,', 'start': 76.32, 'duration': 8.349}, {'end': 85.59, 'text': 'relationships and so on.', 'start': 84.669, 'duration': 0.921}, {'end': 90.82, 'text': 'If you need to refresh the fundamentals, I have a couple of beginner level tutorials on my YouTube channel,', 'start': 86.11, 'duration': 4.71}, {'end': 94.347, 'text': 'as well as comprehensive courses on my website codewithmosh.com.', 'start': 90.82, 'duration': 3.527}, {'end': 96.732, 'text': "I've put the links down below in case you're interested.", 'start': 94.648, 'duration': 2.084}, {'end': 103.792, 'text': "Alright, so I'm assuming that you're the right student for this course.", 'start': 101.431, 'duration': 2.361}], 'summary': 'Mosh recommends learning basics of relational databases and offers tutorials on youtube and courses on his website codewithmosh.com.', 'duration': 27.472, 'max_score': 76.32, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg76320.jpg'}, {'end': 139.631, 'src': 'embed', 'start': 113.737, 'weight': 2, 'content': [{'end': 118.86, 'text': "Because along the way, I will share a lot of tips and tricks and I don't want you to miss out on any of them.", 'start': 113.737, 'duration': 5.123}, {'end': 124.903, 'text': "If you have taken any of my other courses, you know that I'm not going to waste your time with repetitive or useless stuff.", 'start': 119.24, 'duration': 5.663}, {'end': 126.784, 'text': 'So make sure to watch every lesson.', 'start': 125.143, 'duration': 1.641}, {'end': 130.006, 'text': 'Now, while watching each lesson, I want you to take notes.', 'start': 127.184, 'duration': 2.822}, {'end': 134.588, 'text': "You can just write down some keywords on a piece of paper if you don't want to write a lot of notes.", 'start': 130.406, 'duration': 4.182}, {'end': 139.631, 'text': 'I strongly believe that the act of writing things down will help you remember new things that you learn.', 'start': 134.988, 'duration': 4.643}], 'summary': 'Take notes to remember new tips and tricks in the course.', 'duration': 25.894, 'max_score': 113.737, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg113737.jpg'}], 'start': 2.076, 'title': 'Ultimate django course', 'summary': 'Covers an ultimate django course from basics to advanced concepts, enabling students to build production-grade backends for web and mobile apps using python and django, taught by mosh hamadani, a renowned software engineering instructor.', 'chapters': [{'end': 147.739, 'start': 2.076, 'title': 'Ultimate django course', 'summary': 'Covers an ultimate django course from basics to advanced concepts, enabling students to build production-grade backends for web and mobile apps using python and django, taught by mosh hamadani, a renowned software engineering instructor.', 'duration': 145.663, 'highlights': ['Mosh Hamadani, an experienced instructor, will teach everything about Django in a comprehensive, organized, and practical manner, suitable for beginners and experienced learners.', 'Students will require a solid understanding of Python, including object-oriented programming concepts, and basics of relational databases such as tables, columns, primary and foreign keys, and relationships.', 'The course emphasizes the importance of watching the entire content, taking notes, and practicing after each lesson to enhance learning and retention.']}], 'duration': 145.663, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2076.jpg', 'highlights': ['Mosh Hamadani teaches Django comprehensively for beginners and experienced learners.', 'Students need a solid understanding of Python and basics of relational databases.', 'Importance of watching entire content, taking notes, and practicing after each lesson.']}, {'end': 382.978, 'segs': [{'end': 173.51, 'src': 'embed', 'start': 148.399, 'weight': 4, 'content': [{'end': 153.845, 'text': "Also, I've carefully designed tons of exercises that help you understand and remember the materials.", 'start': 148.399, 'duration': 5.446}, {'end': 159.811, 'text': "So make sure to do all these exercises because the more you practice, the better you'll be at Django or coding in general.", 'start': 154.125, 'duration': 5.686}, {'end': 165.227, 'text': 'Welcome back to the ultimate Django course.', 'start': 163.387, 'duration': 1.84}, {'end': 168.488, 'text': "In this section, we're going to talk about the basics of Django.", 'start': 165.688, 'duration': 2.8}, {'end': 173.51, 'text': "First, I will give you a quick introduction to what Django is and why it's so popular.", 'start': 168.948, 'duration': 4.562}], 'summary': 'Ultimate django course covers basics, includes exercises for better understanding and practice.', 'duration': 25.111, 'max_score': 148.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg148399.jpg'}, {'end': 240.431, 'src': 'embed', 'start': 190.154, 'weight': 1, 'content': [{'end': 194.461, 'text': "This is going to be a short and sweet introduction to Django, so let's jump in and get started.", 'start': 190.154, 'duration': 4.307}, {'end': 210.456, 'text': 'So what is Django and why is it so popular? Well, Django is a free and open source framework for building web applications with Python.', 'start': 202.253, 'duration': 8.203}, {'end': 218.639, 'text': "It's not the only web framework for Python, but it's the most popular one because it helps us build a website in less time with fewer lines of code.", 'start': 210.816, 'duration': 7.823}, {'end': 225.601, 'text': "That's why a lot of companies like YouTube, Instagram, Spotify, and Dropbox use Django in their tech stack.", 'start': 219.059, 'duration': 6.542}, {'end': 233.146, 'text': 'Now Django is what we call a batteries included framework, which means it comes with a lot of features out of the box,', 'start': 226.241, 'duration': 6.905}, {'end': 234.907, 'text': "so we don't have to code them from scratch.", 'start': 233.146, 'duration': 1.761}, {'end': 240.431, 'text': 'For example, it gives us an admin interface for managing our data, which is a huge time saver.', 'start': 235.227, 'duration': 5.204}], 'summary': 'Django is popular for web development, used by youtube, instagram, spotify, and dropbox. it offers time-saving features out of the box.', 'duration': 50.277, 'max_score': 190.154, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg190154.jpg'}, {'end': 324.525, 'src': 'embed', 'start': 299.805, 'weight': 3, 'content': [{'end': 306.748, 'text': 'There are so many other things you need to take into account, like the maturity of the framework, how stable it is from one version to another,', 'start': 299.805, 'duration': 6.943}, {'end': 309.469, 'text': 'its learning curve, the size of the community, and so on.', 'start': 306.748, 'duration': 2.721}, {'end': 313.092, 'text': 'Django has been around for a long time and it has a huge community.', 'start': 309.949, 'duration': 3.143}, {'end': 318.258, 'text': 'So there are tons of Django packages built by the community that you can reuse in your applications.', 'start': 313.433, 'duration': 4.825}, {'end': 321.922, 'text': "Also, if you get stuck, there's always someone out there to help you.", 'start': 318.698, 'duration': 3.224}, {'end': 324.525, 'text': 'If you want to hire people, there are tons of people to choose from.', 'start': 322.242, 'duration': 2.283}], 'summary': 'Django has a mature framework, huge community, and numerous packages for reuse.', 'duration': 24.72, 'max_score': 299.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg299805.jpg'}, {'end': 382.978, 'src': 'embed', 'start': 354.008, 'weight': 0, 'content': [{'end': 359.895, 'text': 'Here in the US, the average salary of a Django developer is just over $117, 000 a year.', 'start': 354.008, 'duration': 5.887}, {'end': 366.322, 'text': 'So if you like Python and want to get into web development, learning Django is a good investment for your future.', 'start': 360.816, 'duration': 5.506}, {'end': 377.414, 'text': 'So you learned that Django is a framework for building web applications with Python.', 'start': 372.99, 'duration': 4.424}, {'end': 382.978, 'text': "Now let's talk about some of the fundamental concepts you need to understand to build web applications.", 'start': 377.874, 'duration': 5.104}], 'summary': 'In the us, django developers earn an average of $117,000 annually, making it a lucrative choice for python enthusiasts entering web development.', 'duration': 28.97, 'max_score': 354.008, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg354008.jpg'}], 'start': 148.399, 'title': 'Django framework', 'summary': 'Introduces the basics and benefits of django, highlighting its popularity, essential features, usage by major companies, and the high average annual salary of over $117,000 for django developers in the us.', 'chapters': [{'end': 262.445, 'start': 148.399, 'title': 'Introduction to django basics', 'summary': 'Introduces the basics of django, including its popularity, essential features, and its usage by major companies like youtube, instagram, spotify, and dropbox, to help build web applications with python more efficiently.', 'duration': 114.046, 'highlights': ['Django is a popular framework for building web applications with Python, used by companies like YouTube, Instagram, Spotify, and Dropbox, enabling efficient website development with fewer lines of code.', "Django is a 'batteries included' framework providing features like an admin interface, object-relational mapper, authentication package, and data caching, allowing developers to focus on their application requirements.", 'The chapter includes exercises to aid in understanding and remembering the materials, emphasizing the importance of practice for improving Django or coding skills.']}, {'end': 382.978, 'start': 262.785, 'title': 'Django framework: benefits and considerations', 'summary': 'Discusses the benefits of using django, such as its mature and stable nature, large community support, and high average annual salary of over $117,000 for django developers in the us, while emphasizing the importance of not solely basing framework choices on speed.', 'duration': 120.193, 'highlights': ['Django developers in the US earn an average salary of over $117,000 a year.', 'Emphasizes the importance of not solely basing framework choices on speed.', 'Django has a huge community and tons of packages built by the community that can be reused in applications.', 'Debates about the best framework are considered useless as personal preferences vary.']}], 'duration': 234.579, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg148399.jpg', 'highlights': ['Django developers in the US earn an average salary of over $117,000 a year.', 'Django is a popular framework for building web applications with Python, used by major companies like YouTube, Instagram, Spotify, and Dropbox.', "Django is a 'batteries included' framework providing essential features like an admin interface, object-relational mapper, authentication package, and data caching.", 'Django has a huge community and tons of reusable packages built by the community.', 'The chapter includes exercises to aid in understanding and remembering the materials, emphasizing the importance of practice for improving Django or coding skills.']}, {'end': 622.638, 'segs': [{'end': 428.568, 'src': 'embed', 'start': 401.454, 'weight': 2, 'content': [{'end': 408.698, 'text': 'The backend is the part that runs on a web server and is responsible for data processing, validating business rules, and so on.', 'start': 401.454, 'duration': 7.244}, {'end': 411.999, 'text': "Now let's imagine that Alice wants to visit our website.", 'start': 409.238, 'duration': 2.761}, {'end': 415.001, 'text': 'So she points her browser to moshpy.com.', 'start': 412.4, 'duration': 2.601}, {'end': 420.724, 'text': 'This address is also called a URL, which is short for Uniform Resource Locator.', 'start': 415.521, 'duration': 5.203}, {'end': 423.845, 'text': "It's basically a way to locate a resource on our internet.", 'start': 421.044, 'duration': 2.801}, {'end': 428.568, 'text': 'A resource can be a webpage, an image, a video, a PDF, and so on.', 'start': 424.226, 'duration': 4.342}], 'summary': 'Backend processes data, validates rules, url locates resources on the internet.', 'duration': 27.114, 'max_score': 401.454, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg401454.jpg'}, {'end': 485.044, 'src': 'embed', 'start': 446.854, 'weight': 1, 'content': [{'end': 453.256, 'text': 'This data exchange is defined by a protocol called HTTP, which is short for Hypertext Transfer Protocol.', 'start': 446.854, 'duration': 6.402}, {'end': 456.296, 'text': 'It defines how clients and servers can communicate.', 'start': 453.596, 'duration': 2.7}, {'end': 457.577, 'text': 'So this is the big picture.', 'start': 456.617, 'duration': 0.96}, {'end': 465.999, 'text': 'As Alice navigates our website, for each page, her browser sends an HTTP request to the server and receives an HTTP response.', 'start': 458.257, 'duration': 7.742}, {'end': 471.64, 'text': "Now, as part of building the backend for this website, we need to decide how we're going to respond to clients.", 'start': 466.539, 'duration': 5.101}, {'end': 476.382, 'text': 'One option is to generate the requested page on the server and return it to the client.', 'start': 472.221, 'duration': 4.161}, {'end': 477.882, 'text': 'We use HTML for that.', 'start': 476.882, 'duration': 1}, {'end': 481.363, 'text': 'HTML is short for Hypertext Markup Language.', 'start': 478.422, 'duration': 2.941}, {'end': 485.044, 'text': "It's a simple language for representing webpages and their content.", 'start': 481.763, 'duration': 3.281}], 'summary': 'Http protocol governs client-server communication. html represents webpages.', 'duration': 38.19, 'max_score': 446.854, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg446854.jpg'}, {'end': 526.341, 'src': 'embed', 'start': 501.237, 'weight': 3, 'content': [{'end': 510.004, 'text': 'So instead of putting a complete page or a complete HTML document in an HTTP response, we only return the data like the list of products.', 'start': 501.237, 'duration': 8.767}, {'end': 517.712, 'text': 'Now what is the difference? Well, if we push this responsibility to the client, we can free up the server so it can serve more clients.', 'start': 510.485, 'duration': 7.227}, {'end': 519.494, 'text': 'Our application will be more scalable.', 'start': 518.072, 'duration': 1.422}, {'end': 526.341, 'text': "That's why over the past few years, this approach has become more trendy and is now considered the industry best practice.", 'start': 520.073, 'duration': 6.268}], 'summary': 'Sending only data, not complete documents, in http responses can make the application more scalable, allowing the server to serve more clients.', 'duration': 25.104, 'max_score': 501.237, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg501237.jpg'}, {'end': 603.222, 'src': 'embed', 'start': 539.344, 'weight': 0, 'content': [{'end': 543.727, 'text': "Django falls in this category, so you should not compare Django with, let's say, React.", 'start': 539.344, 'duration': 4.383}, {'end': 551.693, 'text': 'You may compare Django with other server-side frameworks like ASP.NET Core, which is used by C Sharp, developers Express,', 'start': 544.188, 'duration': 7.505}, {'end': 553.415, 'text': 'used by JavaScript developers, and so on.', 'start': 551.693, 'duration': 1.722}, {'end': 562.618, 'text': 'So if we push the responsibility of generating web pages to the client, the server essentially becomes a gateway to the data on the server.', 'start': 554.135, 'duration': 8.483}, {'end': 568.56, 'text': 'We can provide endpoints that the client can talk to to get or save various pieces of data.', 'start': 562.618, 'duration': 5.942}, {'end': 575.883, 'text': 'for example, We can provide one endpoint to get the list of products and another endpoint to get the list of order someone has placed,', 'start': 568.56, 'duration': 7.323}, {'end': 581.387, 'text': 'and Now all these endpoints together represent the interface that clients use to talk to the server.', 'start': 575.883, 'duration': 5.504}, {'end': 587.771, 'text': 'In technical terms, we say the server provides an API or an application programming interface to clients.', 'start': 581.867, 'duration': 5.904}, {'end': 591.453, 'text': 'This API is essentially like the buttons on a remote control.', 'start': 588.251, 'duration': 3.202}, {'end': 597.258, 'text': 'All these buttons together represent the interface or the API we use to interact with a TV.', 'start': 591.994, 'duration': 5.264}, {'end': 603.222, 'text': 'okay?. So in this course, our focus will be on using Django to build an API for our online store.', 'start': 597.258, 'duration': 5.964}], 'summary': 'Django is used to build an api for an online store, allowing clients to access and save data.', 'duration': 63.878, 'max_score': 539.344, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg539344.jpg'}], 'start': 383.539, 'title': 'Building online stores and backend development', 'summary': 'Covers frontend and backend concepts, url role, http protocol, backend response options including html document generation and data return, and the role of django in building server-side apis for client interaction.', 'chapters': [{'end': 465.999, 'start': 383.539, 'title': 'Building an online store: frontend and backend', 'summary': 'Explains the concept of frontend and backend in building an online store, the role of a url in accessing web resources, and the communication between client and server using http protocol.', 'duration': 82.46, 'highlights': ['The frontend and backend are two essential parts of building an online store, responsible for user interaction and data processing respectively.', 'The concept of URL, or Uniform Resource Locator, is crucial for locating resources on the internet, such as webpages, images, videos, and PDFs.', 'The communication between client and server is defined by the HTTP protocol, which governs how data is exchanged between them.']}, {'end': 519.494, 'start': 466.539, 'title': 'Backend response options', 'summary': 'Discusses the two options for building the backend of a website: generating and returning an html document on the server or returning only the necessary data to the client to generate the page, highlighting the scalability advantage of the latter approach.', 'duration': 52.955, 'highlights': ['Returning only necessary data to the client for page generation can improve server scalability by freeing up resources to serve more clients.', 'HTML is a simple language used for representing webpages and their content, and every web page on the internet is built using HTML.', 'The chapter discusses the two options for building the backend of a website: generating and returning an HTML document on the server or returning only the necessary data to the client to generate the page.']}, {'end': 622.638, 'start': 520.073, 'title': 'Django for building apis', 'summary': 'Discusses the trend of using client-side tools like react, angular, and vue for generating web pages, while emphasizing the role of django in building server-side apis, and highlighting the capability of the server to provide an interface for clients to interact with the data.', 'duration': 102.565, 'highlights': ['Django is positioned as a server-side tool for building backends, distinct from client-side tools like React, Angular, and Vue.', "Comparison between Django and server-side frameworks like ASP.NET Core and Express, illustrating Django's role in server-side development.", "Explanation of the server's role as a gateway to data and the provision of endpoints for clients to access and save data, exemplified by providing endpoints for products and orders.", "Emphasizing the server's provision of an API as the interface for clients to interact with, likening it to the buttons on a remote control for a TV, highlighting the analogy of the API's role in interaction.", 'Focus on using Django to build an API for an online store, with an emphasis on client applications utilizing the API for data retrieval and storage, regardless of the front-end development framework used.']}], 'duration': 239.099, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg383539.jpg', 'highlights': ["Django's role in building server-side APIs for client interaction", 'HTTP protocol governs data exchange between client and server', "URL's crucial role in locating resources on the internet", 'Returning only necessary data improves server scalability', "HTML's role in representing webpages and their content", "Django's distinction from client-side tools like React, Angular, and Vue", "Server's role as a gateway to data and provision of endpoints for clients", 'Using Django to build an API for an online store']}, {'end': 1280.901, 'segs': [{'end': 692.924, 'src': 'embed', 'start': 623.399, 'weight': 3, 'content': [{'end': 627.623, 'text': 'All right, now that you understand the big picture, we are ready to set up our development environment.', 'start': 623.399, 'duration': 4.224}, {'end': 629.285, 'text': "And that's what we will do next.", 'start': 627.963, 'duration': 1.322}, {'end': 640.42, 'text': "Alright, let's make sure you have the right setup before we start coding.", 'start': 637.878, 'duration': 2.542}, {'end': 644.523, 'text': 'The first thing I want you to do is upgrade your Python to the latest version.', 'start': 640.88, 'duration': 3.643}, {'end': 650.527, 'text': 'So head over to python.org slash download and download the latest version of Python for your operating system.', 'start': 644.843, 'duration': 5.684}, {'end': 658.573, 'text': 'Once you do that, then open up your terminal window and run python dash dash version to make sure you have upgraded your Python correctly.', 'start': 650.948, 'duration': 7.625}, {'end': 665.521, 'text': 'Now here we see Python 2.7,, because on Mac we have two different versions of Python running side by side.', 'start': 659.514, 'duration': 6.007}, {'end': 671.007, 'text': 'we have the old Python 2, which is now deprecated, and we also have Python 3..', 'start': 665.521, 'duration': 5.486}, {'end': 675.492, 'text': "So if you're using a Mac, you have to run Python 3 dash dash version.", 'start': 671.007, 'duration': 4.485}, {'end': 679.437, 'text': "But if you're on Windows or Linux, you have to run Python dash dash version.", 'start': 675.953, 'duration': 3.484}, {'end': 683.77, 'text': "Okay? So here I'm using Python 3.9.", 'start': 679.597, 'duration': 4.173}, {'end': 684.12, 'text': '5, great.', 'start': 683.77, 'duration': 0.35}, {'end': 690.383, 'text': "Next we're going to use pip or pip3 if you're on Mac to install pipenv.", 'start': 684.94, 'duration': 5.443}, {'end': 692.924, 'text': 'I talked about pipenv in my Python course.', 'start': 690.843, 'duration': 2.081}], 'summary': "Upgrade to latest python version, check with 'python --version', install pipenv using pip or pip3.", 'duration': 69.525, 'max_score': 623.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg623399.jpg'}, {'end': 948.89, 'src': 'heatmap', 'start': 758.427, 'weight': 0.885, 'content': [{'end': 762.668, 'text': "All right, now that we have installed all the necessary tools, let's create our first Django project.", 'start': 758.427, 'duration': 4.241}, {'end': 765.97, 'text': "So here in the terminal window, I'm going to go to my desktop.", 'start': 763.369, 'duration': 2.601}, {'end': 768.25, 'text': 'You can go anywhere on your machine.', 'start': 766.91, 'duration': 1.34}, {'end': 769.131, 'text': "It doesn't really matter.", 'start': 768.31, 'duration': 0.821}, {'end': 773.572, 'text': "Now we're going to create a directory called store front.", 'start': 769.711, 'duration': 3.861}, {'end': 775.093, 'text': 'That is the name of our project.', 'start': 773.932, 'duration': 1.161}, {'end': 781.795, 'text': 'Next, we go inside this directory and run pipenv install Django.', 'start': 776.093, 'duration': 5.702}, {'end': 786.997, 'text': "So we're going to install Django using pipenv inside a virtual environment.", 'start': 782.455, 'duration': 4.542}, {'end': 792.409, 'text': "now let's go ahead all right now.", 'start': 787.765, 'duration': 4.644}, {'end': 799.174, 'text': 'take a look so over here, you can see that pipenv has created a virtual environment for this project.', 'start': 792.409, 'duration': 6.765}, {'end': 802.757, 'text': 'down below, you can see the path to this virtual environment.', 'start': 799.174, 'duration': 3.583}, {'end': 807.261, 'text': "if you're on windows, you're going to see something like c drive, backslash, whatever.", 'start': 802.757, 'duration': 4.504}, {'end': 812.245, 'text': "now, if you're on a mac and using z shell, which is this fancy colorful terminal window,", 'start': 807.261, 'duration': 4.984}, {'end': 816.449, 'text': 'we can hold down the command key and click on this path to go into it.', 'start': 812.245, 'duration': 4.204}, {'end': 821.635, 'text': 'Otherwise, we can just copy this and use the cd command to go inside this directory.', 'start': 817.109, 'duration': 4.526}, {'end': 823.298, 'text': 'Now, take a look.', 'start': 822.516, 'duration': 0.782}, {'end': 826.101, 'text': "So, here's our virtual environment.", 'start': 823.978, 'duration': 2.123}, {'end': 831.108, 'text': 'In this environment, we have this bin folder that contains a bunch of binaries.', 'start': 826.682, 'duration': 4.426}, {'end': 835.013, 'text': 'For example, we have Python, pip, Django admin, and so on.', 'start': 831.348, 'duration': 3.665}, {'end': 841.999, 'text': 'So back to the terminal, pipenv created a virtual environment and installed Django inside that environment.', 'start': 836.114, 'duration': 5.885}, {'end': 849.926, 'text': 'But in addition to this, pipenv also created two files in this directory, pipfile and pipfile.log.', 'start': 842.559, 'duration': 7.367}, {'end': 855.25, 'text': "So I'm going to open this directory using Visual Studio Code by running code period.", 'start': 850.606, 'duration': 4.644}, {'end': 859.454, 'text': "If this doesn't work on your machine, just drag and drop this folder onto VS Code.", 'start': 855.671, 'duration': 3.783}, {'end': 863.374, 'text': "Alright, so here's our pip file.", 'start': 861.673, 'duration': 1.701}, {'end': 866.596, 'text': 'This is like package.json for JavaScript projects.', 'start': 863.794, 'duration': 2.802}, {'end': 872.801, 'text': 'So in this file we can see that our project needs this particular version of Python,', 'start': 867.177, 'duration': 5.624}, {'end': 877.564, 'text': 'and under packages you can see the packages that our application is dependent upon.', 'start': 872.801, 'duration': 4.763}, {'end': 880.486, 'text': 'So here we have Django equals asterisk.', 'start': 878.264, 'duration': 2.222}, {'end': 883.888, 'text': 'That means any version or the latest version of Django.', 'start': 880.766, 'duration': 3.122}, {'end': 888.031, 'text': 'If we installed a particular version of Django, we would see that version here.', 'start': 884.609, 'duration': 3.422}, {'end': 892.98, 'text': 'Now back to the terminal window, we need to activate this virtual environment.', 'start': 889.298, 'duration': 3.682}, {'end': 899.563, 'text': "So we'll use the Python interpreter inside this virtual environment, not the one that is installed globally on this machine.", 'start': 893.4, 'duration': 6.163}, {'end': 902.925, 'text': "To do that, we're going to run pipenv shell.", 'start': 900.223, 'duration': 2.702}, {'end': 909.408, 'text': "Okay, next, we're going to use Django admin to start a new project.", 'start': 904.826, 'duration': 4.582}, {'end': 912.189, 'text': 'Django admin is a utility that comes with Django.', 'start': 909.828, 'duration': 2.361}, {'end': 918.439, 'text': 'So if you run it, we can see all these commands that we can use to work with Django projects.', 'start': 912.61, 'duration': 5.829}, {'end': 921.864, 'text': "As we go through the course, you'll become familiar with these commands.", 'start': 918.92, 'duration': 2.944}, {'end': 929.997, 'text': "In this lesson, we're going to use Django admin start project, and we're going to call that project store front.", 'start': 922.465, 'duration': 7.532}, {'end': 933.065, 'text': 'Now back to VS Code.', 'start': 932.165, 'duration': 0.9}, {'end': 941.828, 'text': 'Django admin created this directory for our project and inside this directory it created another directory that is the core of our application.', 'start': 933.065, 'duration': 8.763}, {'end': 948.89, 'text': "In this directory we have these files, which I'm going to talk about in a second, but before I do so, let's get rid of this redundancy,", 'start': 942.248, 'duration': 6.642}], 'summary': 'Creating a django project with virtual environment and dependencies.', 'duration': 190.463, 'max_score': 758.427, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg758427.jpg'}, {'end': 863.374, 'src': 'embed', 'start': 836.114, 'weight': 0, 'content': [{'end': 841.999, 'text': 'So back to the terminal, pipenv created a virtual environment and installed Django inside that environment.', 'start': 836.114, 'duration': 5.885}, {'end': 849.926, 'text': 'But in addition to this, pipenv also created two files in this directory, pipfile and pipfile.log.', 'start': 842.559, 'duration': 7.367}, {'end': 855.25, 'text': "So I'm going to open this directory using Visual Studio Code by running code period.", 'start': 850.606, 'duration': 4.644}, {'end': 859.454, 'text': "If this doesn't work on your machine, just drag and drop this folder onto VS Code.", 'start': 855.671, 'duration': 3.783}, {'end': 863.374, 'text': "Alright, so here's our pip file.", 'start': 861.673, 'duration': 1.701}], 'summary': 'Pipenv created a virtual environment and installed django, creating pipfile and pipfile.log.', 'duration': 27.26, 'max_score': 836.114, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg836114.jpg'}, {'end': 1150.645, 'src': 'embed', 'start': 1121.147, 'weight': 2, 'content': [{'end': 1122.508, 'text': "so let's move on to the next lesson.", 'start': 1121.147, 'duration': 1.361}, {'end': 1136.82, 'text': "So far, I've been using a separate terminal window, but VS Code also has an integrated terminal window that is easier to use.", 'start': 1130.157, 'duration': 6.663}, {'end': 1143.202, 'text': 'But to use that, we have to properly configure it to use the Python interpreter inside our virtual environment.', 'start': 1137.22, 'duration': 5.982}, {'end': 1144.503, 'text': 'Let me show you how to do this.', 'start': 1143.562, 'duration': 0.941}, {'end': 1146.863, 'text': 'So back to our terminal window.', 'start': 1145.323, 'duration': 1.54}, {'end': 1150.645, 'text': "First, we're going to stop the web server by pressing Control and C.", 'start': 1147.484, 'duration': 3.161}], 'summary': 'Vs code has an integrated terminal for python, requires proper configuration', 'duration': 29.498, 'max_score': 1121.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1121147.jpg'}, {'end': 1243.872, 'src': 'heatmap', 'start': 1162.574, 'weight': 0.907, 'content': [{'end': 1167.119, 'text': "Now here we're going to search for Python Interpreter.", 'start': 1162.574, 'duration': 4.545}, {'end': 1174.465, 'text': 'So currently, VS Code is using this Python interpreter that is installed globally on this machine.', 'start': 1168.723, 'duration': 5.742}, {'end': 1175.546, 'text': "We don't want to use this.", 'start': 1174.805, 'duration': 0.741}, {'end': 1178.267, 'text': 'We want to use the one inside our virtual environment.', 'start': 1176.006, 'duration': 2.261}, {'end': 1181.848, 'text': 'But how can we find the path to our virtual environment? Very easy.', 'start': 1178.687, 'duration': 3.161}, {'end': 1187.891, 'text': "So back to the terminal, let's run pipenv dash dash vnv.", 'start': 1182.548, 'duration': 5.343}, {'end': 1190.051, 'text': "All right, here's the path.", 'start': 1188.991, 'duration': 1.06}, {'end': 1191.512, 'text': "So let's copy this.", 'start': 1190.592, 'duration': 0.92}, {'end': 1196.248, 'text': 'good, now back to vs code.', 'start': 1193.766, 'duration': 2.482}, {'end': 1200.011, 'text': "we're going to select enter interpreter path.", 'start': 1196.248, 'duration': 3.763}, {'end': 1207.117, 'text': "then we're going to paste the path and append slash bin slash python at the end.", 'start': 1200.011, 'duration': 7.106}, {'end': 1211.281, 'text': "if you're on windows, instead of a forward slash, you have to use a backslash.", 'start': 1207.117, 'duration': 4.164}, {'end': 1213.101, 'text': 'okay, Good.', 'start': 1211.281, 'duration': 1.82}, {'end': 1217.906, 'text': 'Now, in this project, we have an extra directory, VS Code.', 'start': 1213.802, 'duration': 4.104}, {'end': 1222.991, 'text': 'We have a settings file, and here we have the path to Python interpreter.', 'start': 1218.467, 'duration': 4.524}, {'end': 1226.134, 'text': 'Good With this, we can go to the view menu.', 'start': 1223.291, 'duration': 2.843}, {'end': 1229.758, 'text': 'Now look, we have this integrated terminal.', 'start': 1227.436, 'duration': 2.322}, {'end': 1232.741, 'text': 'The shortcut on Mac is control and backtick.', 'start': 1230.298, 'duration': 2.443}, {'end': 1239.031, 'text': 'Now VS Code automatically activates the virtual environment for this project.', 'start': 1235.27, 'duration': 3.761}, {'end': 1243.872, 'text': 'So here we can run python manage.py, run server.', 'start': 1239.711, 'duration': 4.161}], 'summary': 'Configuring python interpreter in vs code for virtual environment.', 'duration': 81.298, 'max_score': 1162.574, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1162574.jpg'}], 'start': 623.399, 'title': 'Setting up development environment and dependency management in virtual environments', 'summary': 'Discusses setting up the development environment, including upgrading python and installing pipenv with specific instructions for different operating systems. it also covers setting up virtual environments using pipenv, installing necessary tools, creating a django project, and configuring vs code to use the python interpreter inside the virtual environment.', 'chapters': [{'end': 692.924, 'start': 623.399, 'title': 'Setting up development environment', 'summary': 'Discusses setting up the development environment, including upgrading python to the latest version and installing pipenv using pip or pip3, with specific instructions for different operating systems.', 'duration': 69.525, 'highlights': ['Upgrading Python to the latest version is the first step in setting up the development environment, ensuring compatibility and access to the latest features.', 'Different instructions for running Python version checks are provided based on the operating system (Mac, Windows, or Linux), emphasizing the need for version-specific commands.', 'Using pip or pip3 to install pipenv is recommended, with the instructor mentioning its relevance in their Python course.']}, {'end': 1280.901, 'start': 693.345, 'title': 'Dependency management in virtual environments', 'summary': 'Covers setting up virtual environments using pipenv, installing necessary tools such as vs code and python extension, creating a django project, and configuring vs code to use the python interpreter inside the virtual environment.', 'duration': 587.556, 'highlights': ['Setting up virtual environments using pipenv', 'Installing VS Code and Python extension for Django project', 'Creating a Django project and installing Django using pipenv', 'Configuring VS Code to use the Python interpreter inside the virtual environment']}], 'duration': 657.502, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg623399.jpg', 'highlights': ['Setting up virtual environments using pipenv', 'Creating a Django project and installing Django using pipenv', 'Configuring VS Code to use the Python interpreter inside the virtual environment', 'Upgrading Python to the latest version is the first step in setting up the development environment, ensuring compatibility and access to the latest features', 'Different instructions for running Python version checks are provided based on the operating system (Mac, Windows, or Linux), emphasizing the need for version-specific commands', 'Using pip or pip3 to install pipenv is recommended, with the instructor mentioning its relevance in their Python course']}, {'end': 1738.891, 'segs': [{'end': 1345.071, 'src': 'embed', 'start': 1300.061, 'weight': 0, 'content': [{'end': 1306.482, 'text': "So if you're serious about learning Django and are looking for a job as a backend developer, I highly encourage you to enroll in the course.", 'start': 1300.061, 'duration': 6.421}, {'end': 1313.164, 'text': 'The course comes with tons of exercises and solutions a full e-commerce project that you will eventually deploy to the cloud,', 'start': 1306.902, 'duration': 6.262}, {'end': 1318.449, 'text': 'plus a 30-day money-back guarantee and a certificate of completion you can add to your resume.', 'start': 1313.604, 'duration': 4.845}, {'end': 1321.192, 'text': "In case you're interested, I've put the link down below.", 'start': 1318.91, 'duration': 2.282}, {'end': 1322.673, 'text': "And if not, that's totally fine.", 'start': 1321.492, 'duration': 1.181}, {'end': 1324.015, 'text': "Let's move on to the next lesson.", 'start': 1322.894, 'duration': 1.121}, {'end': 1331.307, 'text': "Alright, let's talk about apps.", 'start': 1330.247, 'duration': 1.06}, {'end': 1337.789, 'text': 'So every Django project is essentially a collection of various apps, each providing certain functionality.', 'start': 1331.887, 'duration': 5.902}, {'end': 1345.071, 'text': 'Just like the apps on your mobile phone, each app provides a certain functionality, right? Django projects are exactly the same.', 'start': 1338.329, 'duration': 6.742}], 'summary': 'Enroll in django course for backend development with exercises, e-commerce project, 30-day money-back guarantee, and certificate.', 'duration': 45.01, 'max_score': 1300.061, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1300061.jpg'}, {'end': 1422.241, 'src': 'embed', 'start': 1391.643, 'weight': 7, 'content': [{'end': 1395.127, 'text': "These days, when building APIs with Django, we don't use the sessions app.", 'start': 1391.643, 'duration': 3.484}, {'end': 1397.41, 'text': 'So we can come here and delete this app.', 'start': 1395.528, 'duration': 1.882}, {'end': 1403.273, 'text': 'Then we have the messages app, which is used for displaying one-time notifications to the user.', 'start': 1398.351, 'duration': 4.922}, {'end': 1409.876, 'text': 'And finally, we have the static files app for serving static files like images, CSS files, and so on.', 'start': 1403.793, 'duration': 6.083}, {'end': 1413.357, 'text': 'So each app provides a certain piece of functionality.', 'start': 1410.356, 'duration': 3.001}, {'end': 1416.058, 'text': 'Okay Now we can also create our own apps here.', 'start': 1413.457, 'duration': 2.601}, {'end': 1417.839, 'text': "So let's save this file.", 'start': 1416.479, 'duration': 1.36}, {'end': 1422.241, 'text': "Now let's open up the terminal window by pressing control and backtick.", 'start': 1418.419, 'duration': 3.822}], 'summary': 'In django, we no longer use the sessions app, but utilize the messages app for notifications and the static files app for serving static files like images and css.', 'duration': 30.598, 'max_score': 1391.643, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1391643.jpg'}, {'end': 1465.527, 'src': 'heatmap', 'start': 1427.345, 'weight': 0.762, 'content': [{'end': 1429.187, 'text': "We're going to open a new terminal window.", 'start': 1427.345, 'duration': 1.842}, {'end': 1432.491, 'text': "Okay, now let's expand this.", 'start': 1429.208, 'duration': 3.283}, {'end': 1436.716, 'text': 'To clear the window, we simply press ctrl and L.', 'start': 1433.272, 'duration': 3.444}, {'end': 1442.803, 'text': "Now we're going to run python manage.py start app, and we're going to call this app playground.", 'start': 1436.716, 'duration': 6.087}, {'end': 1449.099, 'text': "okay, so let's close this window and open up the explorer panel.", 'start': 1444.016, 'duration': 5.083}, {'end': 1455.482, 'text': "all right, look, here's our new app, which is represented using a folder with a special structure.", 'start': 1449.099, 'duration': 6.383}, {'end': 1458.663, 'text': 'so every django app has the exact same structure.', 'start': 1455.482, 'duration': 3.181}, {'end': 1462.185, 'text': 'here we have the migrations folder for generating database tables.', 'start': 1458.663, 'duration': 3.522}, {'end': 1463.686, 'text': "we'll talk about that later in the course.", 'start': 1462.185, 'duration': 1.501}, {'end': 1465.527, 'text': 'we have a complete section about this topic.', 'start': 1463.686, 'duration': 1.841}], 'summary': 'Opening new terminal, clearing window, running python manage.py start app, exploring new app with special structure.', 'duration': 38.182, 'max_score': 1427.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1427345.jpg'}, {'end': 1462.185, 'src': 'embed', 'start': 1436.716, 'weight': 4, 'content': [{'end': 1442.803, 'text': "Now we're going to run python manage.py start app, and we're going to call this app playground.", 'start': 1436.716, 'duration': 6.087}, {'end': 1449.099, 'text': "okay, so let's close this window and open up the explorer panel.", 'start': 1444.016, 'duration': 5.083}, {'end': 1455.482, 'text': "all right, look, here's our new app, which is represented using a folder with a special structure.", 'start': 1449.099, 'duration': 6.383}, {'end': 1458.663, 'text': 'so every django app has the exact same structure.', 'start': 1455.482, 'duration': 3.181}, {'end': 1462.185, 'text': 'here we have the migrations folder for generating database tables.', 'start': 1458.663, 'duration': 3.522}], 'summary': "Running 'python manage.py startapp playground' creates a new app with standard django structure and migrations for database tables.", 'duration': 25.469, 'max_score': 1436.716, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1436716.jpg'}, {'end': 1580.089, 'src': 'embed', 'start': 1552.427, 'weight': 5, 'content': [{'end': 1555.812, 'text': "So here in the playground folder, let's open up the views module.", 'start': 1552.427, 'duration': 3.385}, {'end': 1559.502, 'text': 'This is where we define our views or view functions.', 'start': 1556.721, 'duration': 2.781}, {'end': 1564.944, 'text': 'A view function is a function that takes a request and returns a response.', 'start': 1560.122, 'duration': 4.822}, {'end': 1568.605, 'text': "So more accurately, it's a request handler.", 'start': 1565.564, 'duration': 3.041}, {'end': 1571.526, 'text': "In some frameworks, it's called an action.", 'start': 1569.185, 'duration': 2.341}, {'end': 1573.366, 'text': "In Django, it's called a view.", 'start': 1571.966, 'duration': 1.4}, {'end': 1580.089, 'text': "But I don't agree with this name because from an architectural point of view, a view is often associated with something that the user sees.", 'start': 1573.666, 'duration': 6.423}], 'summary': 'In django, a view function handles requests, not user interface.', 'duration': 27.662, 'max_score': 1552.427, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1552427.jpg'}, {'end': 1706.623, 'src': 'embed', 'start': 1675.529, 'weight': 6, 'content': [{'end': 1679.774, 'text': "Now, in this module, we're going to map our URLs to our view functions.", 'start': 1675.529, 'duration': 4.245}, {'end': 1685.101, 'text': "So, on the top, we're going to import the path function from Django.urls.", 'start': 1680.355, 'duration': 4.746}, {'end': 1688.946, 'text': "So, from Django.urls, we're going to import the path function.", 'start': 1685.742, 'duration': 3.204}, {'end': 1691.189, 'text': "Now, don't worry about memorizing any of this.", 'start': 1689.467, 'duration': 1.722}, {'end': 1694.112, 'text': 'As you practice, all of this will become second nature.', 'start': 1691.709, 'duration': 2.403}, {'end': 1700.698, 'text': 'Also, from the current folder, we should import the views module so we can reference our view function.', 'start': 1694.793, 'duration': 5.905}, {'end': 1706.623, 'text': 'Now we should define a special variable called URL patterns, all in lowercase.', 'start': 1701.359, 'duration': 5.264}], 'summary': 'Module covers mapping urls to view functions in django, importing path function, and defining url patterns.', 'duration': 31.094, 'max_score': 1675.529, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1675529.jpg'}], 'start': 1281.501, 'title': 'Django course and apps', 'summary': "Introduces mosh's 10-hour django course with exercises, an e-commerce project, a 30-day money-back guarantee, and a certificate. it covers django app structure, default and new apps, and the concept of views with url mapping.", 'chapters': [{'end': 1318.449, 'start': 1281.501, 'title': 'Ultimate django course', 'summary': "Introduces mosh's ultimate django course, a 10-hour course with exercises, a full e-commerce project, 30-day money-back guarantee, and a certificate of completion, aimed at those serious about learning django and pursuing a backend developer job.", 'duration': 36.948, 'highlights': ['The ultimate Django course is approximately 10 hours long and offers exercises, a full e-commerce project, and a 30-day money-back guarantee.', 'Enrollment in the course comes with a certificate of completion that can be added to a resume, making it valuable for those seeking a job as a backend developer.', 'The course is recommended for individuals serious about learning Django and pursuing a career as a backend developer.']}, {'end': 1738.891, 'start': 1318.91, 'title': 'Django apps and views', 'summary': 'Covers the structure of django apps, including default apps and creating new ones, and explains the concept of views and how to map urls to view functions.', 'duration': 419.981, 'highlights': ['Django projects consist of various apps, each providing certain functionality, such as admin interface, user authentication, and serving static files.', 'When building APIs with Django, the sessions app is not used, and can be deleted.', "The process of creating a new Django app involves running 'python manage.py startapp [app_name]' and configuring the app's structure, including models, tests, and views.", 'In Django, views are request handlers that define how to handle HTTP requests and generate responses, and are defined in the views module.', 'URLs are mapped to view functions using the urls.py file, where the path function from Django.urls is used to create URL pattern objects.']}], 'duration': 457.39, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1281501.jpg', 'highlights': ['The ultimate Django course is approximately 10 hours long and offers exercises, a full e-commerce project, and a 30-day money-back guarantee.', 'Enrollment in the course comes with a certificate of completion that can be added to a resume, making it valuable for those seeking a job as a backend developer.', 'The course is recommended for individuals serious about learning Django and pursuing a career as a backend developer.', 'Django projects consist of various apps, each providing certain functionality, such as admin interface, user authentication, and serving static files.', "The process of creating a new Django app involves running 'python manage.py startapp [app_name]' and configuring the app's structure, including models, tests, and views.", 'In Django, views are request handlers that define how to handle HTTP requests and generate responses, and are defined in the views module.', 'URLs are mapped to view functions using the urls.py file, where the path function from Django.urls is used to create URL pattern objects.', 'When building APIs with Django, the sessions app is not used, and can be deleted.']}, {'end': 2167.084, 'segs': [{'end': 1766.893, 'src': 'embed', 'start': 1739.611, 'weight': 4, 'content': [{'end': 1744.715, 'text': 'The second parameter is view, which is a function that returns HTTP response object.', 'start': 1739.611, 'duration': 5.104}, {'end': 1745.956, 'text': 'Now look over here.', 'start': 1745.316, 'duration': 0.64}, {'end': 1749.819, 'text': 'This notation represents the return type of this function.', 'start': 1746.757, 'duration': 3.062}, {'end': 1753.963, 'text': 'So the path function returns a URL pattern object.', 'start': 1750.4, 'duration': 3.563}, {'end': 1756.765, 'text': "So I'm going to call this function and give it two arguments.", 'start': 1754.723, 'duration': 2.042}, {'end': 1763.511, 'text': 'A route or a URL, which is playground slash hello, and a view function.', 'start': 1757.506, 'duration': 6.005}, {'end': 1766.893, 'text': "So from the views module, we're going to get say hello.", 'start': 1764.171, 'duration': 2.722}], 'summary': 'The path function returns a url pattern object and takes two arguments - a route or url and a view function.', 'duration': 27.282, 'max_score': 1739.611, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1739611.jpg'}, {'end': 1867.02, 'src': 'embed', 'start': 1836.738, 'weight': 3, 'content': [{'end': 1843.515, 'text': 'Then we use the include function to reference the URL configuration module in this app.', 'start': 1836.738, 'duration': 6.777}, {'end': 1856.952, 'text': "So we're going to call path and say any URLs that start with playground, followed by a forward slash, should be routed to our playground app.", 'start': 1845.563, 'duration': 11.389}, {'end': 1858.954, 'text': 'So this is where we use the include function.', 'start': 1857.212, 'duration': 1.742}, {'end': 1863.057, 'text': 'Now the include function requires a parameter that is a string.', 'start': 1859.794, 'duration': 3.263}, {'end': 1867.02, 'text': "Here we're going to reference playground dot URLs.", 'start': 1863.077, 'duration': 3.943}], 'summary': 'Using include function to route urls starting with playground to playground app.', 'duration': 30.282, 'max_score': 1836.738, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1836738.jpg'}, {'end': 2003.688, 'src': 'heatmap', 'start': 1868.368, 'weight': 0, 'content': [{'end': 1878.338, 'text': 'So if we send a request to playground slash hello Django knows that all requests that start with playground should be handled by this app.', 'start': 1868.368, 'duration': 9.97}, {'end': 1887.547, 'text': "So it's going to chop off the first part of this URL and pass the rest to the URL configuration module in the playground app.", 'start': 1878.719, 'duration': 8.828}, {'end': 1896.718, 'text': 'So back to this urls module, we no longer need to add playground here, because we added it once in the main url configuration module.', 'start': 1888.288, 'duration': 8.43}, {'end': 1900.343, 'text': 'So we simply add hello, followed by a forward slash.', 'start': 1897.619, 'duration': 2.724}, {'end': 1901.244, 'text': 'I forgot to add that.', 'start': 1900.443, 'duration': 0.801}, {'end': 1903.967, 'text': 'We always end our route with a forward slash.', 'start': 1901.424, 'duration': 2.543}, {'end': 1907.466, 'text': "so let's save the changes now.", 'start': 1904.764, 'duration': 2.702}, {'end': 1912.17, 'text': 'whenever we change our code, django web server automatically restores itself.', 'start': 1907.466, 'duration': 4.704}, {'end': 1914.812, 'text': "so let's open up the terminal window.", 'start': 1912.17, 'duration': 2.642}, {'end': 1916.153, 'text': "make sure we don't have any arrows.", 'start': 1914.812, 'duration': 1.341}, {'end': 1919.235, 'text': 'good, so back to the browser.', 'start': 1916.153, 'duration': 3.082}, {'end': 1921.457, 'text': "let's send a request to this endpoint.", 'start': 1919.235, 'duration': 2.222}, {'end': 1924.239, 'text': 'great, we see hello world on the screen.', 'start': 1921.457, 'duration': 2.782}, {'end': 1927.222, 'text': 'so this is how we can map urls to view functions.', 'start': 1924.239, 'duration': 2.983}, {'end': 1928.603, 'text': "next we're going to talk about templates.", 'start': 1927.222, 'duration': 1.381}, {'end': 1938.029, 'text': 'So I told you that views in Django are not really views.', 'start': 1935.327, 'duration': 2.702}, {'end': 1940.591, 'text': "They're more like request handlers or actions.", 'start': 1938.269, 'duration': 2.322}, {'end': 1944.855, 'text': 'What we often call a view in other frameworks is called a template in Django.', 'start': 1941.072, 'duration': 3.783}, {'end': 1949.879, 'text': "So let's see how we can use a template to return HTML content to the client.", 'start': 1945.395, 'duration': 4.484}, {'end': 1955.704, 'text': "So here in the Playground app, we're going to add a new folder called templates.", 'start': 1950.7, 'duration': 5.004}, {'end': 1961.789, 'text': "And in this folder, we're going to add a new file called hello.html.", 'start': 1957.045, 'duration': 4.744}, {'end': 1963.43, 'text': 'And of course, we could call it anything.', 'start': 1962.129, 'duration': 1.301}, {'end': 1966.246, 'text': 'And here we can write some HTML markup.', 'start': 1964.605, 'duration': 1.641}, {'end': 1972.568, 'text': 'For example, we can type h1 and press tab to add an h1 heading and say hello world.', 'start': 1966.426, 'duration': 6.142}, {'end': 1976.01, 'text': "Now don't worry if you don't know HTML, we're not gonna use it in this course.", 'start': 1973.069, 'duration': 2.941}, {'end': 1978.751, 'text': 'I just wanna show you how Django templates work.', 'start': 1976.27, 'duration': 2.481}, {'end': 1980.912, 'text': "So let's save the changes.", 'start': 1979.451, 'duration': 1.461}, {'end': 1982.993, 'text': 'Now, back to our view function.', 'start': 1981.672, 'duration': 1.321}, {'end': 1992.601, 'text': "Instead of returning a plain HTTP response, we're going to use the render function to render a template and return HTML markup to the client.", 'start': 1983.914, 'duration': 8.687}, {'end': 1997.105, 'text': "So let's remove this line and call the render function.", 'start': 1993.202, 'duration': 3.903}, {'end': 2000.406, 'text': 'Now, look at the return type of this function.', 'start': 1997.845, 'duration': 2.561}, {'end': 2003.688, 'text': 'It returns an HTTP response object.', 'start': 2001.026, 'duration': 2.662}], 'summary': 'Django maps urls to view functions, uses templates to return html content to the client.', 'duration': 52.988, 'max_score': 1868.368, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1868368.jpg'}, {'end': 2089.127, 'src': 'embed', 'start': 2059.277, 'weight': 1, 'content': [{'end': 2061.577, 'text': 'so back to our template.', 'start': 2059.277, 'duration': 2.3}, {'end': 2065.277, 'text': 'instead of hello world, we can dynamically render some value.', 'start': 2061.577, 'duration': 3.7}, {'end': 2066.699, 'text': 'so back to our view function.', 'start': 2065.277, 'duration': 1.422}, {'end': 2070.02, 'text': "Let's type a comma to see the next parameter.", 'start': 2067.719, 'duration': 2.301}, {'end': 2077.161, 'text': 'That is a context object and the type of this is a mapping of string to any.', 'start': 2070.739, 'duration': 6.422}, {'end': 2084.045, 'text': 'That means we can pass any mapping object that maps a string value to any other type of object.', 'start': 2077.683, 'duration': 6.362}, {'end': 2086.286, 'text': 'So here we can pass a dictionary.', 'start': 2084.645, 'duration': 1.641}, {'end': 2089.127, 'text': "So let's pass a dictionary.", 'start': 2087.186, 'duration': 1.941}], 'summary': 'Template renders dynamic values using context object and dictionary.', 'duration': 29.85, 'max_score': 2059.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2059277.jpg'}, {'end': 2167.084, 'src': 'embed', 'start': 2113.827, 'weight': 2, 'content': [{'end': 2116.889, 'text': 'Now, in this template, we can also write some logic.', 'start': 2113.827, 'duration': 3.062}, {'end': 2119.511, 'text': 'So we can type an if statement.', 'start': 2117.47, 'duration': 2.041}, {'end': 2124.916, 'text': 'So we type braces, and in between them, we add two percentage signs.', 'start': 2119.772, 'duration': 5.144}, {'end': 2127.596, 'text': 'In between them, we can write an if statement.', 'start': 2125.676, 'duration': 1.92}, {'end': 2131.877, 'text': 'So we can say if name is set, we can render it here.', 'start': 2127.856, 'duration': 4.021}, {'end': 2138.758, 'text': 'Otherwise, we can render hello world.', 'start': 2132.857, 'duration': 5.901}, {'end': 2141.599, 'text': 'And of course, we need an end if clause as well.', 'start': 2139.458, 'duration': 2.141}, {'end': 2143.639, 'text': 'So end if.', 'start': 2142.019, 'duration': 1.62}, {'end': 2149.08, 'text': "Now this syntax is kind of ugly, but the good thing about Django is that it's modular.", 'start': 2144.799, 'duration': 4.281}, {'end': 2154.521, 'text': "So you can easily replace Django's default template engine with your preferred template engine.", 'start': 2149.4, 'duration': 5.121}, {'end': 2159.682, 'text': "But once again, we don't really use templates in Django projects that often these days.", 'start': 2154.961, 'duration': 4.721}, {'end': 2167.084, 'text': 'There are special cases for them, but for the most part, we use Django to build APIs that return data, not HTML content.', 'start': 2160.002, 'duration': 7.082}], 'summary': 'Django templates allow logic with if statements and are easily replaceable; django projects mainly focus on building apis for data, not html content.', 'duration': 53.257, 'max_score': 2113.827, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2113827.jpg'}], 'start': 1739.611, 'title': 'Django url configuration and templates overview', 'summary': "Covers django url configuration, mapping urls to view functions, importing and including url configurations, and using templates to return html content. it also discusses the use of django templates to render html markup, passing parameters through context objects, and incorporating logic such as if statements, highlighting django's modularity and the shift towards using django for apis rather than html content.", 'chapters': [{'end': 1976.01, 'start': 1739.611, 'title': 'Django url configuration', 'summary': 'Covers the django url configuration and includes the process of mapping urls to view functions, importing and including url configurations, and using templates to return html content to the client.', 'duration': 236.399, 'highlights': ["The URL path 'playground/hello' is routed to the view function say_hello.", 'Importing and including URL configurations using the include function.', "Adding a new file 'hello.html' in the 'templates' folder to return HTML content to the client."]}, {'end': 2167.084, 'start': 1976.27, 'title': 'Django templates overview', 'summary': "Discusses the use of django templates to render html markup, passing parameters through context objects, and incorporating logic such as if statements, highlighting django's modularity and the shift towards using django for apis rather than html content.", 'duration': 190.814, 'highlights': ['Django templates used to render HTML markup and return HTTP response', 'Passing parameters through context objects', 'Incorporating logic with if statements in templates', "Django's modularity and shift towards using Django for APIs"]}], 'duration': 427.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg1739611.jpg', 'highlights': ['Django templates used to render HTML markup and return HTTP response', 'Passing parameters through context objects', 'Incorporating logic with if statements in templates', 'Importing and including URL configurations using the include function', "The URL path 'playground/hello' is routed to the view function say_hello", "Adding a new file 'hello.html' in the 'templates' folder to return HTML content to the client", "Django's modularity and shift towards using Django for APIs"]}, {'end': 2869.295, 'segs': [{'end': 2240.196, 'src': 'embed', 'start': 2206.275, 'weight': 2, 'content': [{'end': 2211.478, 'text': 'Basically we need to create a launch profile so VS Code knows how to run or debug this application.', 'start': 2206.275, 'duration': 5.203}, {'end': 2213.159, 'text': "So let's click on this.", 'start': 2211.998, 'duration': 1.161}, {'end': 2216.389, 'text': 'Now in this list, select Django.', 'start': 2214.232, 'duration': 2.157}, {'end': 2220.672, 'text': "all right, here's our launch.json file.", 'start': 2218.191, 'duration': 2.481}, {'end': 2222.572, 'text': 'what you see here is kind of like a dictionary.', 'start': 2220.672, 'duration': 1.9}, {'end': 2225.813, 'text': 'in python we have a bunch of key value pairs.', 'start': 2222.572, 'duration': 3.241}, {'end': 2229.094, 'text': 'these key value pairs define a launch profile.', 'start': 2225.813, 'duration': 3.281}, {'end': 2240.196, 'text': 'so vs code knows that to run this application it should use the current python interpreter to run manage.py, which exists in our workspace folder,', 'start': 2229.094, 'duration': 11.102}], 'summary': 'Create launch profile in vs code for django application', 'duration': 33.921, 'max_score': 2206.275, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2206275.jpg'}, {'end': 2336.451, 'src': 'embed', 'start': 2281.979, 'weight': 0, 'content': [{'end': 2287.146, 'text': "So let's set x to 1 and y to 2.", 'start': 2281.979, 'duration': 5.167}, {'end': 2291.208, 'text': "now i'm going to click on this line to insert a breakpoint.", 'start': 2287.146, 'duration': 4.062}, {'end': 2297.312, 'text': 'when we add a breakpoint vs code will execute every line of code until it hits our breakpoint.', 'start': 2291.208, 'duration': 6.104}, {'end': 2301.314, 'text': 'from that point onward we can execute our code line by line.', 'start': 2297.312, 'duration': 4.002}, {'end': 2306.197, 'text': "so let's add a breakpoint and then start the application for debugging.", 'start': 2301.314, 'duration': 4.883}, {'end': 2312.044, 'text': 'Alright, let me collapse this window.', 'start': 2310.464, 'duration': 1.58}, {'end': 2319.306, 'text': 'Good So in this new terminal window, we have a development server listening on port 9000.', 'start': 2312.825, 'duration': 6.481}, {'end': 2324.348, 'text': "So let's hold down the command key on Mac or control on Windows and click on this link.", 'start': 2319.306, 'duration': 5.042}, {'end': 2326.308, 'text': "Alright, here's what we get.", 'start': 2325.388, 'duration': 0.92}, {'end': 2330.549, 'text': 'The homepage of our project is gone because we have registered a custom route.', 'start': 2326.828, 'duration': 3.721}, {'end': 2332.53, 'text': 'That is playground slash hello.', 'start': 2330.829, 'duration': 1.701}, {'end': 2336.451, 'text': 'So we see the homepage only the first time we run our Django project.', 'start': 2333.03, 'duration': 3.421}], 'summary': 'Set x to 1, y to 2, add breakpoint, execute code, start application on port 9000, access homepage.', 'duration': 54.472, 'max_score': 2281.979, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2281979.jpg'}, {'end': 2585.746, 'src': 'embed', 'start': 2538.175, 'weight': 1, 'content': [{'end': 2542.819, 'text': 'So if we press shift and F11, we get back to the previous function.', 'start': 2538.175, 'duration': 4.644}, {'end': 2546.582, 'text': 'So this is how we can debug Django applications in VS Code.', 'start': 2543.64, 'duration': 2.942}, {'end': 2553.388, 'text': "Now, once we're done, it's always a good practice to remove these breakpoints, otherwise they get in the way.", 'start': 2547.122, 'duration': 6.266}, {'end': 2560.193, 'text': 'So as you debug your applications, you place various breakpoints in different parts of your code, and you will hit them all the time.', 'start': 2553.728, 'duration': 6.465}, {'end': 2563.316, 'text': "So always remove your breakpoints once you're done with them.", 'start': 2560.553, 'duration': 2.763}, {'end': 2565.481, 'text': "So we're done with this debugging session.", 'start': 2564.056, 'duration': 1.425}, {'end': 2571.098, 'text': 'Now we can disconnect by pressing shift and F5 or clicking on this icon.', 'start': 2566.083, 'duration': 5.015}, {'end': 2575.564, 'text': 'Alright? Now, one last tip before we finish this lesson.', 'start': 2572.543, 'duration': 3.021}, {'end': 2582.585, 'text': 'On the top, under the run menu, look, we have a command called run without debugging.', 'start': 2576.324, 'duration': 6.261}, {'end': 2585.746, 'text': 'The shortcut on Mac is control and F5.', 'start': 2583.305, 'duration': 2.441}], 'summary': 'Debug django apps in vs code, remove breakpoints after use, disconnect using shift+f5 or icon. tip: use run without debugging option.', 'duration': 47.571, 'max_score': 2538.175, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2538175.jpg'}, {'end': 2669.237, 'src': 'embed', 'start': 2638.128, 'weight': 5, 'content': [{'end': 2640.708, 'text': 'So this is how we can run our application without debugging.', 'start': 2638.128, 'duration': 2.58}, {'end': 2645.409, 'text': 'Just remember that if you use this command, your breakpoints are not going to get hit.', 'start': 2641.208, 'duration': 4.201}, {'end': 2649.73, 'text': 'So if you want to debug your applications, you should start it in the debug mode.', 'start': 2645.909, 'duration': 3.821}, {'end': 2662.195, 'text': 'There is another way to debug Django applications using a powerful tool called Django Debug Toolbar.', 'start': 2656.428, 'duration': 5.767}, {'end': 2669.237, 'text': "So if you go to Google and search for Django Debug Toolbar, you're gonna find this page over here.", 'start': 2662.735, 'duration': 6.502}], 'summary': 'Running application without debugging; use django debug toolbar for debugging.', 'duration': 31.109, 'max_score': 2638.128, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2638128.jpg'}], 'start': 2167.604, 'title': 'Debugging django applications', 'summary': 'Covers debugging django applications in vs code, including setting up debugging, creating launch profiles, and running the application for debugging, resulting in a development server listening on port 9000. it also demonstrates code execution with breakpoints, stepping over, into, and out of functions, as well as installation of django debug toolbar and running applications without debugging.', 'chapters': [{'end': 2336.451, 'start': 2167.604, 'title': 'Debugging django applications in vs code', 'summary': 'Covers the process of setting up and using debugging in vs code for django applications, including creating a launch profile with specific configurations and running the application for debugging, resulting in a development server listening on port 9000 and demonstrating the execution of code line by line with breakpoints.', 'duration': 168.847, 'highlights': ['The process of setting up and using debugging in VS Code for Django applications', 'Running the application for debugging, resulting in a development server listening on port 9000', 'Creating a launch profile with specific configurations', 'Demonstrating the execution of code line by line with breakpoints']}, {'end': 2869.295, 'start': 2337.091, 'title': 'Debugging django applications', 'summary': 'Demonstrates debugging django applications in vs code, covering the use of breakpoints, stepping over, stepping into, and stepping out of functions, as well as a tip for running applications without debugging and the installation of django debug toolbar.', 'duration': 532.204, 'highlights': ['Debugging with breakpoints and stepping over and into functions', 'Removing breakpoints after debugging', 'Running applications without debugging and the use of Django Debug Toolbar']}], 'duration': 701.691, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2167604.jpg', 'highlights': ['Running the application for debugging, resulting in a development server listening on port 9000', 'The process of setting up and using debugging in VS Code for Django applications', 'Creating a launch profile with specific configurations', 'Demonstrating the execution of code line by line with breakpoints', 'Debugging with breakpoints and stepping over and into functions', 'Running applications without debugging and the use of Django Debug Toolbar', 'Removing breakpoints after debugging']}, {'end': 3386.558, 'segs': [{'end': 2897.37, 'src': 'embed', 'start': 2870.435, 'weight': 0, 'content': [{'end': 2874.176, 'text': "Now back to the browser, refresh, and here's Django debug toolbar.", 'start': 2870.435, 'duration': 3.741}, {'end': 2878.498, 'text': "Here we have different panels like history, we're seeing the URLs we have hit so far.", 'start': 2874.737, 'duration': 3.761}, {'end': 2883.82, 'text': "We have versions, to see the version of Django, Python, and debug toolbar we're running.", 'start': 2879.058, 'duration': 4.762}, {'end': 2889.584, 'text': 'we have processing time, we have our settings, we have request headers and so on.', 'start': 2884.44, 'duration': 5.144}, {'end': 2894.728, 'text': 'now my personal favorite panel is the sql or sql panel.', 'start': 2889.584, 'duration': 5.144}, {'end': 2897.37, 'text': 'here we can see the queries that are sent to the database.', 'start': 2894.728, 'duration': 2.642}], 'summary': 'Django debug toolbar shows history, versions, processing time, settings, request headers, and sql queries sent to the database.', 'duration': 26.935, 'max_score': 2870.435, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2870435.jpg'}, {'end': 2980.892, 'src': 'embed', 'start': 2951.212, 'weight': 1, 'content': [{'end': 2954.796, 'text': "We'll use these classes to store and retrieve data throughout the course.", 'start': 2951.212, 'duration': 3.584}, {'end': 2957.118, 'text': "So let's jump in and get started.", 'start': 2955.296, 'duration': 1.822}, {'end': 2969.021, 'text': 'The first step in every Django project is figuring out the pieces of data we want to store.', 'start': 2964.417, 'duration': 4.604}, {'end': 2973.545, 'text': 'So what entities or concepts do we have in an e-commerce application?', 'start': 2969.842, 'duration': 3.703}, {'end': 2980.892, 'text': 'Well, for starters, we need the concept of a product with attributes like title, description, price and inventory.', 'start': 2974.126, 'duration': 6.766}], 'summary': 'Using classes to store and retrieve data in django, focusing on e-commerce application with product attributes.', 'duration': 29.68, 'max_score': 2951.212, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2951212.jpg'}, {'end': 3219.472, 'src': 'embed', 'start': 3157.532, 'weight': 3, 'content': [{'end': 3163.356, 'text': "So we're going to have an entity or a model or a class called cart, with an attribute called created at.", 'start': 3157.532, 'duration': 5.824}, {'end': 3171.536, 'text': "Let's assume that we need to know when each cart is created, so every now and then we can do a clean up and remove carts that are 30 days old.", 'start': 3163.953, 'duration': 7.583}, {'end': 3172.777, 'text': 'I just made this up.', 'start': 3171.976, 'duration': 0.801}, {'end': 3178.399, 'text': 'But in a real scenario, you should always design your models based on the requirements of your project.', 'start': 3173.017, 'duration': 5.382}, {'end': 3184.641, 'text': "Don't make up your own rules, okay? Now, we need a relationship or an association between products and carts.", 'start': 3178.639, 'duration': 6.002}, {'end': 3189.003, 'text': 'Because a cart can have multiple products, and a product might be in different carts.', 'start': 3184.962, 'duration': 4.041}, {'end': 3193.025, 'text': 'So here we have a many-to-many relationship between products and carts.', 'start': 3189.664, 'duration': 3.361}, {'end': 3197.85, 'text': 'Now, sometimes the relationship between two entities can have attributes.', 'start': 3193.705, 'duration': 4.145}, {'end': 3205.017, 'text': 'for example, if a product is in a shopping cart, We need to know how many instances of that product we have in the shopping cart.', 'start': 3197.85, 'duration': 7.167}, {'end': 3208.701, 'text': 'So this relationship itself should have an attribute called quantity.', 'start': 3205.017, 'duration': 3.684}, {'end': 3215.468, 'text': "So we're gonna add a new entity here called cart item and Now look at the notation I've used to represent this concept.", 'start': 3209.402, 'duration': 6.066}, {'end': 3219.472, 'text': "I've connected cart item to the relationship using a dashed line.", 'start': 3215.948, 'duration': 3.524}], 'summary': "Design a cart model with 'created at' attribute. establish many-to-many relationship between products and carts, with a 'quantity' attribute for the relationship.", 'duration': 61.94, 'max_score': 3157.532, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3157532.jpg'}, {'end': 3337.604, 'src': 'embed', 'start': 3304.325, 'weight': 6, 'content': [{'end': 3305.525, 'text': "Now let's talk about customers.", 'start': 3304.325, 'duration': 1.2}, {'end': 3311.669, 'text': 'So our customer entity can have attributes like name, email, username, password, and so on.', 'start': 3306.266, 'duration': 5.403}, {'end': 3314.671, 'text': "Now for simplicity, I'm only showing name and email here.", 'start': 3311.97, 'duration': 2.701}, {'end': 3321.336, 'text': 'Now a customer can have many orders and each order belongs to one and only one customer.', 'start': 3315.392, 'duration': 5.944}, {'end': 3325.098, 'text': 'So we need a one-to-many relationship between customers and orders.', 'start': 3321.816, 'duration': 3.282}, {'end': 3328.9, 'text': 'Now, once again, the order entity might have multiple attributes.', 'start': 3325.698, 'duration': 3.202}, {'end': 3337.604, 'text': 'For now, we just want to know when this order was placed, okay? Now, an order can contain multiple products and a product can be in multiple orders.', 'start': 3329.2, 'duration': 8.404}], 'summary': 'Customer entity with name and email, one-to-many relationship with orders, order placement, and multiple products per order.', 'duration': 33.279, 'max_score': 3304.325, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3304325.jpg'}, {'end': 3390.919, 'src': 'embed', 'start': 3364.314, 'weight': 7, 'content': [{'end': 3371.835, 'text': 'Similarly, an order item references one and only one product while a given product might be referenced by multiple order items.', 'start': 3364.314, 'duration': 7.521}, {'end': 3374.136, 'text': 'So two one-to-many relationships.', 'start': 3372.296, 'duration': 1.84}, {'end': 3377.435, 'text': 'So these are the entities that I wanted you to identify.', 'start': 3375.054, 'duration': 2.381}, {'end': 3382.657, 'text': 'But to make this project more interesting, I decided to throw in one more entity, tag.', 'start': 3377.755, 'duration': 4.902}, {'end': 3386.558, 'text': 'Here we have a many-to-many relationship between products and tags,', 'start': 3383.137, 'duration': 3.421}, {'end': 3390.919, 'text': 'because a product can have many tags and a tag might be referenced by different products.', 'start': 3386.558, 'duration': 4.361}], 'summary': 'Entities include product, order item, and tag with one-to-many and many-to-many relationships.', 'duration': 26.605, 'max_score': 3364.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3364314.jpg'}], 'start': 2870.435, 'title': 'Django debug toolbar, data modeling & e-commerce entity modeling', 'summary': 'Introduces the django debug toolbar, showcasing its panels and functionalities such as viewing database queries and version details. it also provides an overview of data modeling in django, discussing the design of a data model for an e-commerce application, including the concept of products and collections, and their relationships. additionally, it discusses the essential entities and their relationships in an e-commerce application, involving a total of seven entities, including the one-to-many and many-to-many relationships between products, collections, carts, and orders, along with the concept of association classes and the absence of a relationship between carts and customers.', 'chapters': [{'end': 3092.628, 'start': 2870.435, 'title': 'Django debug toolbar & data modeling', 'summary': 'Introduces the django debug toolbar, showcasing its panels and functionalities such as viewing database queries and version details. it also provides an overview of data modeling in django, discussing the design of a data model for an e-commerce application, including the concept of products and collections, and their relationships.', 'duration': 222.193, 'highlights': ['The Django Debug Toolbar provides various panels including history, versions, processing time, settings, request headers, and SQL for viewing database queries.', 'The chapter introduces the concept of data modeling in Django and its application in designing a data model for an e-commerce application.', 'The data model for an e-commerce application includes the concepts of products with attributes like title, description, price, and inventory, as well as collections or categories with a title attribute.']}, {'end': 3386.558, 'start': 3092.628, 'title': 'E-commerce entity modeling', 'summary': 'Discusses the essential entities and their relationships in an e-commerce application, including the one-to-many and many-to-many relationships between products, collections, carts, and orders, along with the concept of association classes and the absence of a relationship between carts and customers, involving a total of seven entities.', 'duration': 293.93, 'highlights': ['The chapter discusses the essential entities and their relationships in an e-commerce application, including the one-to-many and many-to-many relationships between products, collections, carts, and orders, along with the concept of association classes and the absence of a relationship between carts and customers, involving a total of seven entities.', 'In every e-commerce application, a shopping cart entity or model is essential, with an attribute called created at, and a many-to-many relationship between products and carts, potentially requiring a clean-up of carts that are 30 days old.', 'The concept of an association class, represented by an entity called cart item, is introduced to handle the many-to-many relationship between products and carts, with an attribute called quantity to track instances of products in the shopping cart.', 'The customer entity can have attributes like name and email, and a one-to-many relationship with orders, while the order entity has a many-to-many relationship with products and an entity called order item, representing the relationship with an attribute called quantity.', 'A many-to-many relationship between products and tags is introduced, adding complexity to the entity model of the e-commerce application.']}], 'duration': 516.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg2870435.jpg', 'highlights': ['The Django Debug Toolbar provides various panels including history, versions, processing time, settings, request headers, and SQL for viewing database queries.', 'The chapter introduces the concept of data modeling in Django and its application in designing a data model for an e-commerce application.', 'The data model for an e-commerce application includes the concepts of products with attributes like title, description, price, and inventory, as well as collections or categories with a title attribute.', 'The chapter discusses the essential entities and their relationships in an e-commerce application, including the one-to-many and many-to-many relationships between products, collections, carts, and orders, along with the concept of association classes and the absence of a relationship between carts and customers, involving a total of seven entities.', 'In every e-commerce application, a shopping cart entity or model is essential, with an attribute called created at, and a many-to-many relationship between products and carts, potentially requiring a clean-up of carts that are 30 days old.', 'The concept of an association class, represented by an entity called cart item, is introduced to handle the many-to-many relationship between products and carts, with an attribute called quantity to track instances of products in the shopping cart.', 'The customer entity can have attributes like name and email, and a one-to-many relationship with orders, while the order entity has a many-to-many relationship with products and an entity called order item, representing the relationship with an attribute called quantity.', 'A many-to-many relationship between products and tags is introduced, adding complexity to the entity model of the e-commerce application.']}, {'end': 3751.683, 'segs': [{'end': 3444.758, 'src': 'embed', 'start': 3415.302, 'weight': 3, 'content': [{'end': 3419.725, 'text': "So in this lesson, we're going to look at a few different ways to organize our entities in different apps.", 'start': 3415.302, 'duration': 4.423}, {'end': 3424.927, 'text': 'one way is to have a single app called the store and drop all of our entities here.', 'start': 3420.485, 'duration': 4.442}, {'end': 3434.392, 'text': 'now we can bundle and distribute this app via pip and this way anyone can install this app in their project and get all these models and the functionality around them.', 'start': 3424.927, 'duration': 9.465}, {'end': 3439.975, 'text': "so next time we're working on an e-commerce project, we don't have to rewrite the same functionality over and over.", 'start': 3434.392, 'duration': 5.583}, {'end': 3444.758, 'text': 'we simply install this app in our project and write extra code for customization.', 'start': 3439.975, 'duration': 4.783}], 'summary': 'Organize entities in a single app to be distributed via pip for easy installation and reuse in e-commerce projects.', 'duration': 29.456, 'max_score': 3415.302, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3415302.jpg'}, {'end': 3483.815, 'src': 'embed', 'start': 3455.582, 'weight': 4, 'content': [{'end': 3459.363, 'text': 'This is what we call a monolith, like a large, heavy piece of stone.', 'start': 3455.582, 'duration': 3.781}, {'end': 3464.845, 'text': 'So at some point, our application might become hard to understand, hard to maintain, and hard to reuse.', 'start': 3459.963, 'duration': 4.882}, {'end': 3468.086, 'text': 'It becomes like one of those remote controls with too many buttons.', 'start': 3465.245, 'duration': 2.841}, {'end': 3471.827, 'text': 'When designing these apps, we want to follow the Unix philosophy.', 'start': 3468.646, 'duration': 3.181}, {'end': 3474.848, 'text': 'So each app should do one thing and do it well.', 'start': 3472.147, 'duration': 2.701}, {'end': 3477.489, 'text': "so here's another solution.", 'start': 3476.028, 'duration': 1.461}, {'end': 3483.815, 'text': 'we can break down this project into four small apps the products app, which represents a product catalog.', 'start': 3477.489, 'duration': 6.326}], 'summary': 'Breaking down the monolithic app into four small apps for better understanding and maintainability.', 'duration': 28.233, 'max_score': 3455.582, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3455582.jpg'}, {'end': 3661.176, 'src': 'embed', 'start': 3635.585, 'weight': 0, 'content': [{'end': 3642.287, 'text': 'Plus, we have zero coupling between these apps, so we can independently change and deploy them without affecting other apps.', 'start': 3635.585, 'duration': 6.702}, {'end': 3646.308, 'text': 'This is the proper way to break down this project into multiple apps.', 'start': 3642.787, 'duration': 3.521}, {'end': 3648.049, 'text': "So here's the takeaway.", 'start': 3647.188, 'duration': 0.861}, {'end': 3654.572, 'text': "If our app boundary is so large, we'll end up with a monolith that gets bloated and becomes hard to reuse.", 'start': 3648.869, 'duration': 5.703}, {'end': 3661.176, 'text': "On the other hand, if our app boundaries are so small and fine-grained, we'll end up with a lot of coupling between them.", 'start': 3655.133, 'duration': 6.043}], 'summary': 'Zero coupling allows independent changes; proper app breakdown prevents monolith; large boundaries lead to monolith, small to coupling.', 'duration': 25.591, 'max_score': 3635.585, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3635585.jpg'}, {'end': 3706.496, 'src': 'embed', 'start': 3676.717, 'weight': 1, 'content': [{'end': 3678.418, 'text': "we're going to create two new apps.", 'start': 3676.717, 'duration': 1.701}, {'end': 3682.921, 'text': 'so we run python, manage.py start app.', 'start': 3678.418, 'duration': 4.503}, {'end': 3688.925, 'text': 'the first app is store and the second one is tags.', 'start': 3682.921, 'duration': 6.004}, {'end': 3695.67, 'text': 'okay, now, as i told you before, every time we create a new app, we should add it in the list of installed apps.', 'start': 3688.925, 'duration': 6.745}, {'end': 3700.293, 'text': "so let's close this window and go to our settings module.", 'start': 3695.67, 'duration': 4.623}, {'end': 3701.574, 'text': "here's the list of install apps.", 'start': 3700.293, 'duration': 1.281}, {'end': 3704.015, 'text': "I'm going to add those apps right here.", 'start': 3702.014, 'duration': 2.001}, {'end': 3706.496, 'text': 'So store and tags.', 'start': 3704.575, 'duration': 1.921}], 'summary': "Creating two new apps, 'store' and 'tags', added to installed apps list.", 'duration': 29.779, 'max_score': 3676.717, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3676717.jpg'}], 'start': 3386.558, 'title': 'Organizing django apps and proper app breakdown', 'summary': "Emphasizes the importance of organizing django apps to avoid creating bloated monoliths and discusses the benefits of proper app breakdown, including the creation of 'store' and 'tags' apps in django.", 'chapters': [{'end': 3477.489, 'start': 3386.558, 'title': 'Organizing entities in django apps', 'summary': 'Discusses the importance of organizing django apps to avoid creating bloated monoliths and emphasizes the unix philosophy of each app doing one thing well, which allows for easier maintenance and reusability in projects.', 'duration': 90.931, 'highlights': ['The chapter emphasizes the importance of organizing Django apps to avoid creating bloated monoliths and stresses the Unix philosophy of each app doing one thing well for easier maintenance and reusability in projects.', 'Discussing the drawbacks of a monolithic application, which becomes hard to understand, maintain, and reuse as it grows more complex, likening it to a remote control with too many buttons.', 'Explaining the option of bundling and distributing an app via pip, enabling others to install the app in their projects and utilize its models and functionalities.']}, {'end': 3751.683, 'start': 3477.489, 'title': 'Proper app breakdown in django', 'summary': "Discusses the drawbacks of breaking down a project into multiple apps, the benefits of proper app breakdown, and the process of creating two new apps 'store' and 'tags' in django.", 'duration': 274.194, 'highlights': ['The drawbacks of breaking down a project into multiple apps', 'The benefits of proper app breakdown in Django', "Creating two new apps 'store' and 'tags' in Django"]}], 'duration': 365.125, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/rHux0gMZ3Eg/pics/rHux0gMZ3Eg3386558.jpg', 'highlights': ['The benefits of proper app breakdown in Django', "Creating two new apps 'store' and 'tags' in Django", 'The chapter emphasizes the importance of organizing Django apps to avoid creating bloated monoliths and stresses the Unix philosophy of each app doing one thing well for easier maintenance and reusability in projects', 'Explaining the option of bundling and distributing an app via pip, enabling others to install the app in their projects and utilize its models and functionalities', 'Discussing the drawbacks of a monolithic application, which becomes hard to understand, maintain, and reuse as it grows more complex, likening it to a remote control with too many buttons']}], 'highlights': ['Django developers in the US earn an average salary of over $117,000 a year.', 'The ultimate Django course is approximately 10 hours long and offers exercises, a full e-commerce project, and a 30-day money-back guarantee.', 'Mosh Hamadani teaches Django comprehensively for beginners and experienced learners.', 'Enrollment in the course comes with a certificate of completion that can be added to a resume, making it valuable for those seeking a job as a backend developer.', 'The benefits of proper app breakdown in Django', 'Setting up virtual environments using pipenv', 'The chapter introduces the concept of data modeling in Django and its application in designing a data model for an e-commerce application.', "Creating two new apps 'store' and 'tags' in Django", 'Importance of watching entire content, taking notes, and practicing after each lesson.', "Django's role in building server-side APIs for client interaction"]}