title
Python Django Tutorial - Build A Todo App

description
If you are new to Django and want a better explained tutorial, check out the newer crash course - https://www.youtube.com/watch?v=D6esTdOLXh4 In this video we will install Django and build a todo list application. This is a guide for beginners just starting out with Django and the Python programming language CODE: https://github.com/bradtraversy/django-todolist SUPPORT THIS CHANNEL WITH A CUP OF COFFEE PER MONTH: http://www.patreon.com/traversymedia ONE TIME DONATIONS: http://www.paypal.me/traversymedia

detail
{'title': 'Python Django Tutorial - Build A Todo App', 'heatmap': [{'end': 492.183, 'start': 453.501, 'weight': 1}, {'end': 737.755, 'start': 579.626, 'weight': 0.841}, {'end': 834.429, 'start': 795.427, 'weight': 0.846}, {'end': 963.716, 'start': 915.478, 'weight': 0.703}, {'end': 1169.309, 'start': 1131.143, 'weight': 0.892}, {'end': 1396.596, 'start': 1348.447, 'weight': 0.838}, {'end': 1869.421, 'start': 1834.955, 'weight': 0.733}], 'summary': 'Learn django by building a to-do app, covering installation on ubuntu, creating python app, setting up mysql for production, building web app with crud functionalities, and customizing admin panel.', 'chapters': [{'end': 101.506, 'segs': [{'end': 48.13, 'src': 'embed', 'start': 22.498, 'weight': 2, 'content': [{'end': 27.519, 'text': "i know it's kind of backwards, but this is going to be more of a demo than a structured tutorial.", 'start': 22.498, 'duration': 5.021}, {'end': 34.202, 'text': "just to let you know, I'll explain what I can, but I'm not going to go in depth on every piece of code that I write.", 'start': 27.519, 'duration': 6.683}, {'end': 41.746, 'text': "We're going to build a to-do list with the Django administration panel so that we can log into the admin and add to-dos.", 'start': 35.283, 'duration': 6.463}, {'end': 48.13, 'text': 'Now you can follow along with this tutorial and build pretty much any kind of CRUD application.', 'start': 42.507, 'duration': 5.623}], 'summary': 'Demo of building a to-do list with django admin for crud application', 'duration': 25.632, 'max_score': 22.498, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw22498.jpg'}, {'end': 91.34, 'src': 'embed', 'start': 64.721, 'weight': 0, 'content': [{'end': 72.289, 'text': "So it's supposed to take all the hassle of web development and it relies heavily on the command line to help us do things really quickly.", 'start': 64.721, 'duration': 7.568}, {'end': 78.133, 'text': "Django is a little different than, let's say, Ruby on Rails or other MVC frameworks.", 'start': 73.25, 'duration': 4.883}, {'end': 82.695, 'text': 'It actually follows the MVT design pattern, which is Model-View-Template.', 'start': 78.713, 'duration': 3.982}, {'end': 91.34, 'text': 'So basically, we create our models, we link to a database, and we put our logic inside of a view file and then display the UI with templates.', 'start': 83.456, 'duration': 7.884}], 'summary': 'Django simplifies web dev, follows mvt pattern and relies on command line for efficiency.', 'duration': 26.619, 'max_score': 64.721, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw64721.jpg'}], 'start': 0.714, 'title': 'Getting started with django', 'summary': 'Covers how to get started with django, a high level python framework, by building a to-do list with the django administration panel and explains its mvt design pattern.', 'chapters': [{'end': 101.506, 'start': 0.714, 'title': 'Getting started with django', 'summary': 'Covers how to get started with django, a high level python framework that encourages rapid development and pragmatic design, by building a to-do list with the django administration panel, and explains its mvt design pattern.', 'duration': 100.792, 'highlights': ['Django is a high level Python framework that encourages rapid development and pragmatic design. Django is designed to simplify web development and promote rapid development, which can be beneficial for creating applications efficiently.', 'Building a to-do list with the Django administration panel to log into the admin and add to-dos demonstrates the practical application of Django. The practical demonstration of building a to-do list showcases the real-world application of Django using the administration panel for creating and managing tasks.', "Django follows the MVT design pattern, which involves creating models, linking to a database, and putting logic inside a view file. Explains the MVT design pattern used by Django, which involves models, database linkage, and logic in the view file, offering insights into the framework's architecture."]}], 'duration': 100.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw714.jpg', 'highlights': ['Django is designed to simplify web development and promote rapid development, which can be beneficial for creating applications efficiently.', 'The practical demonstration of building a to-do list showcases the real-world application of Django using the administration panel for creating and managing tasks.', "Explains the MVT design pattern used by Django, which involves models, database linkage, and logic in the view file, offering insights into the framework's architecture."]}, {'end': 418.194, 'segs': [{'end': 130.377, 'src': 'embed', 'start': 102.006, 'weight': 2, 'content': [{'end': 107.527, 'text': "Alright, now I'm relatively new to Django, so if you're a seasoned Django developer and you see me,", 'start': 102.006, 'duration': 5.521}, {'end': 113.208, 'text': 'do something wrong or something where there could be a better way, just go ahead and let me know in the comments.', 'start': 107.527, 'duration': 5.681}, {'end': 114.549, 'text': "But don't be an asshole.", 'start': 113.608, 'duration': 0.941}, {'end': 116.889, 'text': "Alright, so let's get started.", 'start': 115.789, 'duration': 1.1}, {'end': 118.77, 'text': "I'm going to go ahead and open up my terminal.", 'start': 116.909, 'duration': 1.861}, {'end': 121.87, 'text': "I'm using Terminator, but you can use any terminal program.", 'start': 119.23, 'duration': 2.64}, {'end': 125.511, 'text': 'And first thing we want to do, let me just make this a little bigger.', 'start': 122.69, 'duration': 2.821}, {'end': 130.377, 'text': 'We want to install pip, which is the Python package manager.', 'start': 127.332, 'duration': 3.045}], 'summary': 'New to django, setting up pip in the terminal.', 'duration': 28.371, 'max_score': 102.006, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw102006.jpg'}, {'end': 230.558, 'src': 'embed', 'start': 173.979, 'weight': 0, 'content': [{'end': 187.767, 'text': "All right, so now that we updated our package manager, let's do sudo apt-get install, and then we want to do python-pip.", 'start': 173.979, 'duration': 13.788}, {'end': 207.267, 'text': "yes, all right, and once that's done, we can install django using pip.", 'start': 190.563, 'duration': 16.704}, {'end': 214.148, 'text': "all right, so now let's do sudo pip install django.", 'start': 207.267, 'duration': 6.881}, {'end': 229.817, 'text': "Okay, now it's telling us we're using pip version 8.1 and version 9.0..", 'start': 223.194, 'duration': 6.623}, {'end': 230.558, 'text': '1 is available.', 'start': 229.817, 'duration': 0.741}], 'summary': 'Updated package manager, installed python-pip, and django using pip. upgraded pip version from 8.1 to 9.0.1.', 'duration': 56.579, 'max_score': 173.979, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw173979.jpg'}, {'end': 281.66, 'src': 'embed', 'start': 253.993, 'weight': 1, 'content': [{'end': 261.339, 'text': 'Now, there is something called virtual environment that you can install so that you can manage multiple Django applications.', 'start': 253.993, 'duration': 7.346}, {'end': 262.98, 'text': "I'm sorry, Python applications.", 'start': 261.358, 'duration': 1.622}, {'end': 267.103, 'text': 'Or not applications, but different environments.', 'start': 264.862, 'duration': 2.241}, {'end': 271.507, 'text': "So that's something you may want to look into if you plan on doing a lot of Python development.", 'start': 267.364, 'duration': 4.143}, {'end': 273.669, 'text': "But I'm not going to do that in this video.", 'start': 272.047, 'duration': 1.622}, {'end': 281.66, 'text': "All right, so now what we want to do is we're going to create a folder, a directory.", 'start': 274.656, 'duration': 7.004}], 'summary': 'Using virtual environment to manage multiple python applications is recommended for python development.', 'duration': 27.667, 'max_score': 253.993, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw253993.jpg'}], 'start': 102.006, 'title': 'Installing django and creating an application in linux', 'summary': 'Covers the installation process of django on ubuntu, including updating the package manager, installing pip, and checking the installation. it also outlines setting up a virtual environment for managing python applications, creating a django application in a linux environment, and exploring the structure and key components of the django project.', 'chapters': [{'end': 252.288, 'start': 102.006, 'title': 'Installing django on ubuntu', 'summary': 'Outlines the process of installing django on ubuntu, including updating the package manager, installing pip, and checking the installation using specific commands and versions.', 'duration': 150.282, 'highlights': ['The chapter demonstrates the process of installing Django on Ubuntu, including updating the package manager, installing pip, and checking the installation using specific commands and versions.', 'The tutorial indicates the use of sudo apt-get update to update the package manager, followed by the installation of pip using sudo apt-get install python-pip.', 'It highlights the use of the command sudo pip install django to install Django, with a mention of the available pip version 9.0.1.', 'The chapter mentions the use of django-admin --version to check the installed Django version, which is specified as 1.10.5.']}, {'end': 418.194, 'start': 253.993, 'title': 'Creating a django application in linux', 'summary': 'Introduces setting up a virtual environment for managing python applications, creating a django application in a linux environment, and exploring the structure and key components of the django project.', 'duration': 164.201, 'highlights': ['Setting up a virtual environment for managing Python applications is recommended for extensive Python development. The speaker recommends setting up a virtual environment for managing multiple Python applications, which can be beneficial for extensive Python development.', "Creating a Django application in a Linux environment by using Django admin and starting a project named 'to-do list'. The process of creating a Django application in a Linux environment is demonstrated, involving the use of Django admin to start a project named 'to-do list'.", 'Exploring the structure and key components of the Django project, such as settings, URLs, WSGI, and static files. The speaker explores the structure and key components of the Django project, including settings, URLs, WSGI, static files, and their functionalities within the project.']}], 'duration': 316.188, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw102006.jpg', 'highlights': ['The chapter demonstrates the process of installing Django on Ubuntu, including updating the package manager, installing pip, and checking the installation using specific commands and versions.', "Creating a Django application in a Linux environment by using Django admin and starting a project named 'to-do list'.", 'Exploring the structure and key components of the Django project, such as settings, URLs, WSGI, and static files.', 'Setting up a virtual environment for managing Python applications is recommended for extensive Python development.']}, {'end': 851.806, 'segs': [{'end': 492.183, 'src': 'heatmap', 'start': 453.501, 'weight': 1, 'content': [{'end': 463.874, 'text': "So what we can do is we can say Python and we can say manage.py and then start app and then let's call it to do's.", 'start': 453.501, 'duration': 10.373}, {'end': 470.395, 'text': 'Now if we look in our folder structure here, you can see it created a to-dos folder with a bunch of stuff in it.', 'start': 465.374, 'duration': 5.021}, {'end': 476.817, 'text': "We have our admin.py, apps, models, that's where we put all of our models, tests, and then views.", 'start': 470.735, 'duration': 6.082}, {'end': 485.679, 'text': "We also have migrations because we can perform database actions through migrations just like we can with Ruby on Rails if you've ever used that.", 'start': 476.877, 'duration': 8.802}, {'end': 489.701, 'text': 'So the next thing I want to do is I want to try and run the server.', 'start': 486.739, 'duration': 2.962}, {'end': 492.183, 'text': 'So I cleared out my console here.', 'start': 489.801, 'duration': 2.382}], 'summary': "Using python manage.py to create 'to-dos' app with models, tests, views, and migrations.", 'duration': 38.682, 'max_score': 453.501, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw453501.jpg'}, {'end': 492.183, 'src': 'embed', 'start': 465.374, 'weight': 1, 'content': [{'end': 470.395, 'text': 'Now if we look in our folder structure here, you can see it created a to-dos folder with a bunch of stuff in it.', 'start': 465.374, 'duration': 5.021}, {'end': 476.817, 'text': "We have our admin.py, apps, models, that's where we put all of our models, tests, and then views.", 'start': 470.735, 'duration': 6.082}, {'end': 485.679, 'text': "We also have migrations because we can perform database actions through migrations just like we can with Ruby on Rails if you've ever used that.", 'start': 476.877, 'duration': 8.802}, {'end': 489.701, 'text': 'So the next thing I want to do is I want to try and run the server.', 'start': 486.739, 'duration': 2.962}, {'end': 492.183, 'text': 'So I cleared out my console here.', 'start': 489.801, 'duration': 2.382}], 'summary': 'Created to-dos folder with admin.py, apps, models, tests, views, and migrations. trying to run the server.', 'duration': 26.809, 'max_score': 465.374, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw465374.jpg'}, {'end': 737.755, 'src': 'heatmap', 'start': 573.064, 'weight': 2, 'content': [{'end': 579.165, 'text': "And then anything that goes to to-dos, we want to send to the to-dos URL file, which we're going to create in a second.", 'start': 573.064, 'duration': 6.101}, {'end': 581.826, 'text': 'So right here we can say include.', 'start': 579.626, 'duration': 2.2}, {'end': 585.467, 'text': 'We say include.', 'start': 584.507, 'duration': 0.96}, {'end': 591.828, 'text': 'And we want to use the to-dos.urls file.', 'start': 586.667, 'duration': 5.161}, {'end': 598.23, 'text': 'Okay, so if we go to to-dos slash add, then all we have to put in our to-dos URL file is add.', 'start': 592.489, 'duration': 5.741}, {'end': 602.278, 'text': 'Now, this include right here, we actually have to bring in.', 'start': 599.335, 'duration': 2.943}, {'end': 605.581, 'text': "So right here, we're going to just say include, comma.", 'start': 602.378, 'duration': 3.203}, {'end': 608.384, 'text': "All right, so we'll save that.", 'start': 606.983, 'duration': 1.401}, {'end': 613.669, 'text': "Now let's go into our to-dos folder and create a URLs file.", 'start': 610.066, 'duration': 3.603}, {'end': 615.892, 'text': "So we'll say urls.py.", 'start': 614.15, 'duration': 1.742}, {'end': 630.963, 'text': "And then in here, we want to bring in the URLs package, so we'll say from django.conf.urls, and we want to import URL.", 'start': 618.74, 'duration': 12.223}, {'end': 641.185, 'text': "We also want to import the views, so we're going to say from dot, which is the current folder, import the views file.", 'start': 633.703, 'duration': 7.482}, {'end': 647.954, 'text': "And then just like we have in this URL's file, this URL patterns, we're going to just grab that.", 'start': 642.389, 'duration': 5.565}, {'end': 651.878, 'text': "Okay, and then let's get rid of that one.", 'start': 647.974, 'duration': 3.904}, {'end': 654.24, 'text': 'And then the route we want to match here.', 'start': 651.898, 'duration': 2.342}, {'end': 660.124, 'text': "So we'll say carrot and then money sign.", 'start': 656.883, 'duration': 3.241}, {'end': 662.165, 'text': 'So this means start with and end with.', 'start': 660.144, 'duration': 2.021}, {'end': 665.186, 'text': "So whatever we put in the middle here is what it's going to match.", 'start': 662.285, 'duration': 2.901}, {'end': 667.847, 'text': "Now this is going to be just the root of to do's.", 'start': 665.686, 'duration': 2.161}, {'end': 669.368, 'text': "So just slash to do's.", 'start': 668.307, 'duration': 1.061}, {'end': 671.008, 'text': "So we're not going to put anything in there.", 'start': 669.468, 'duration': 1.54}, {'end': 678.671, 'text': 'And then we want it to go to views and then the index function.', 'start': 672.048, 'duration': 6.623}, {'end': 679.191, 'text': 'All right.', 'start': 678.691, 'duration': 0.5}, {'end': 681.452, 'text': "And then we're also going to give this a name of index.", 'start': 679.211, 'duration': 2.241}, {'end': 688.376, 'text': "So it's going to look for a function in the views file called index.", 'start': 684.355, 'duration': 4.021}, {'end': 691.678, 'text': "All right, so let's save that.", 'start': 690.157, 'duration': 1.521}, {'end': 695.279, 'text': "And it's not going to work yet because there's no index.", 'start': 692.598, 'duration': 2.681}, {'end': 697.14, 'text': "Let's see.", 'start': 696.499, 'duration': 0.641}, {'end': 698.92, 'text': 'To do is not defined.', 'start': 697.22, 'duration': 1.7}, {'end': 705.222, 'text': 'Oh, I think I messed up something here.', 'start': 703.282, 'duration': 1.94}, {'end': 706.983, 'text': 'Yeah, this should actually be in quotes.', 'start': 705.302, 'duration': 1.681}, {'end': 709.484, 'text': "It's looking at it as a variable.", 'start': 707.943, 'duration': 1.541}, {'end': 716.821, 'text': 'module object has no attribute index.', 'start': 713.399, 'duration': 3.422}, {'end': 719.943, 'text': "let's see.", 'start': 716.821, 'duration': 3.122}, {'end': 724.987, 'text': "um, oh, actually that's right, because we have no index function and it's looking for it.", 'start': 719.943, 'duration': 5.044}, {'end': 729.229, 'text': "so now let's go into our views.py, and we're going to go right here.", 'start': 724.987, 'duration': 4.242}, {'end': 732.211, 'text': "we're going to say def, define index.", 'start': 729.229, 'duration': 2.982}, {'end': 737.755, 'text': "this is how you create a function in python And it's going to take a parameter of request,", 'start': 732.211, 'duration': 5.544}], 'summary': 'Creating and linking urls, views, and functions for to-dos in django', 'duration': 29.214, 'max_score': 573.064, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw573064.jpg'}, {'end': 662.165, 'src': 'embed', 'start': 633.703, 'weight': 0, 'content': [{'end': 641.185, 'text': "We also want to import the views, so we're going to say from dot, which is the current folder, import the views file.", 'start': 633.703, 'duration': 7.482}, {'end': 647.954, 'text': "And then just like we have in this URL's file, this URL patterns, we're going to just grab that.", 'start': 642.389, 'duration': 5.565}, {'end': 651.878, 'text': "Okay, and then let's get rid of that one.", 'start': 647.974, 'duration': 3.904}, {'end': 654.24, 'text': 'And then the route we want to match here.', 'start': 651.898, 'duration': 2.342}, {'end': 660.124, 'text': "So we'll say carrot and then money sign.", 'start': 656.883, 'duration': 3.241}, {'end': 662.165, 'text': 'So this means start with and end with.', 'start': 660.144, 'duration': 2.021}], 'summary': 'Import views from the current folder and specify route matching', 'duration': 28.462, 'max_score': 633.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw633703.jpg'}, {'end': 776.793, 'src': 'embed', 'start': 747.522, 'weight': 3, 'content': [{'end': 751.965, 'text': 'And that all goes in that request object.', 'start': 747.522, 'duration': 4.443}, {'end': 757.329, 'text': 'So we need to decide what we want to happen when the index view is loaded.', 'start': 753.226, 'duration': 4.103}, {'end': 762.393, 'text': "So what I'm going to do is just return HTTP response.", 'start': 757.449, 'duration': 4.944}, {'end': 776.793, 'text': "HTTP response and then we'll just send some text so we'll just say Hello worlds a world all right now in order to use this HTTP response.", 'start': 764.667, 'duration': 12.126}], 'summary': "The index view will return an http response with the text 'hello world' upon loading.", 'duration': 29.271, 'max_score': 747.522, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw747522.jpg'}, {'end': 834.429, 'src': 'heatmap', 'start': 795.427, 'weight': 0.846, 'content': [{'end': 796.548, 'text': "So let's save that.", 'start': 795.427, 'duration': 1.121}, {'end': 805.377, 'text': "And let's see, invalid syntax, def index, request.", 'start': 796.568, 'duration': 8.809}, {'end': 808.58, 'text': 'Oh, we need the, forgot the colon.', 'start': 805.437, 'duration': 3.143}, {'end': 813.685, 'text': "Okay, so now we get hello world at slash to do's.", 'start': 810.762, 'duration': 2.923}, {'end': 818.376, 'text': 'now i also want that the home page to go to the to do.', 'start': 815.393, 'duration': 2.983}, {'end': 822.579, 'text': 'so what we can do is in our to do list, and then you are ls dot pie.', 'start': 818.376, 'duration': 4.203}, {'end': 834.429, 'text': "i'm just gonna copy this and it's peace that in there and then just get rid of the to do's, although it was just for uh.", 'start': 822.579, 'duration': 11.85}], 'summary': "Fixing syntax errors and updating homepage redirection to 'to do' list.", 'duration': 39.002, 'max_score': 795.427, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw795427.jpg'}], 'start': 419.255, 'title': 'Python app creation and server setup', 'summary': "Covers creating a to-dos module in python using manage.py, setting up routes and views for a to-do's app using django, and connecting to a database. it aims to generate a folder structure with admin, models, tests, views, and migrations and run the server on localhost port 8000.", 'chapters': [{'end': 515.322, 'start': 419.255, 'title': 'Creating python apps and running the server', 'summary': 'Focuses on creating a to-dos module in python using manage.py, which generates a folder structure with admin, models, tests, views, and migrations, and then running the server on localhost port 8000.', 'duration': 96.067, 'highlights': ['The chapter emphasizes creating modules in Python, such as a to-dos module, using manage.py, which generates a folder structure with admin, models, tests, views, and migrations.', "The chapter explains the process of running the server on localhost port 8000 using the command 'python manage.py runserver'.", "Python's manage.py file is used to create a to-dos module or app, which generates a specific folder structure with admin.py, apps, models, tests, and views."]}, {'end': 851.806, 'start': 515.322, 'title': "To do's app setup", 'summary': "Covers setting up routes and views for a to-do's app using django, including creating urls, defining views, and importing http response, aiming to create an index page for the app and connect to a database.", 'duration': 336.484, 'highlights': ["Setting up routes and views for a to-do's app using Django The transcript covers setting up routes and views for a to-do's app using Django to create an index page for the app and connect to a database.", 'Defining views and importing HTTP response The chapter explains defining views and importing HTTP response in Django to handle requests and send HTTP responses, ensuring the functionality of the app.', "Creating URLs for the to-do's app It details creating URLs for the to-do's app, including importing URL and views, and defining URL patterns to direct requests to specific views within the app."]}], 'duration': 432.551, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw419255.jpg', 'highlights': ['The chapter emphasizes creating modules in Python, such as a to-dos module, using manage.py, which generates a folder structure with admin, models, tests, views, and migrations.', "Setting up routes and views for a to-do's app using Django to create an index page for the app and connect to a database.", "The chapter explains the process of running the server on localhost port 8000 using the command 'python manage.py runserver'.", 'Defining views and importing HTTP response in Django to handle requests and send HTTP responses, ensuring the functionality of the app.']}, {'end': 1239.629, 'segs': [{'end': 882.789, 'src': 'embed', 'start': 852.206, 'weight': 0, 'content': [{'end': 860.433, 'text': "So if we go to settings.py and go down to databases, you'll see that by default it uses SQLite.", 'start': 852.206, 'duration': 8.227}, {'end': 860.733, 'text': 'SQLite is.', 'start': 860.453, 'duration': 0.28}, {'end': 866.318, 'text': "It's a file-based database.", 'start': 864.457, 'duration': 1.861}, {'end': 867.359, 'text': "It's very simple.", 'start': 866.438, 'duration': 0.921}, {'end': 874.464, 'text': "It's really good for prototyping and development, but it's not something you would want to use in production,", 'start': 867.919, 'duration': 6.545}, {'end': 878.426, 'text': "unless it's a really really small site with not that much data.", 'start': 874.464, 'duration': 3.962}, {'end': 882.789, 'text': 'But what I would suggest is that you use either Postgres or MySQL.', 'start': 879.107, 'duration': 3.682}], 'summary': 'Using sqlite for prototyping, but prefer postgres or mysql for production due to limitations.', 'duration': 30.583, 'max_score': 852.206, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw852206.jpg'}, {'end': 974.307, 'src': 'heatmap', 'start': 915.478, 'weight': 1, 'content': [{'end': 920.542, 'text': "Oops That's wrong.", 'start': 915.478, 'duration': 5.064}, {'end': 928.469, 'text': 'And then we want to do sudo apt-get install.', 'start': 924.505, 'duration': 3.964}, {'end': 931.792, 'text': 'And we want to install mysql-server.', 'start': 929.87, 'duration': 1.922}, {'end': 948.244, 'text': "Yes Okay, so we're going to set a password for our root user.", 'start': 933.213, 'duration': 15.031}, {'end': 963.716, 'text': "Okay, let's say service MySQL status.", 'start': 948.264, 'duration': 15.452}, {'end': 965.804, 'text': "Okay, so it's running.", 'start': 964.804, 'duration': 1}, {'end': 972.506, 'text': "Now what we're going to do is we need to install the Python MySQL module.", 'start': 966.825, 'duration': 5.681}, {'end': 974.307, 'text': "So let's go ahead and do that.", 'start': 972.866, 'duration': 1.441}], 'summary': 'Installing mysql-server, setting root password, checking mysql status, and installing python mysql module.', 'duration': 65.191, 'max_score': 915.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw915478.jpg'}, {'end': 1120.435, 'src': 'embed', 'start': 1084.642, 'weight': 3, 'content': [{'end': 1088.305, 'text': "Okay, let's see.", 'start': 1084.642, 'duration': 3.663}, {'end': 1092.227, 'text': "We're going to put in the user, which is root.", 'start': 1088.325, 'duration': 3.902}, {'end': 1097.09, 'text': 'And we want to put in the password.', 'start': 1094.529, 'duration': 2.561}, {'end': 1103.491, 'text': 'You want to put in whatever you used.', 'start': 1097.11, 'duration': 6.381}, {'end': 1106.732, 'text': "And let's see, we'll say host.", 'start': 1104.811, 'duration': 1.921}, {'end': 1112.233, 'text': "Host, we're going to leave blank because the default is your local host.", 'start': 1108.872, 'duration': 3.361}, {'end': 1116.974, 'text': "And then port, we'll also leave that blank for the default port.", 'start': 1112.513, 'duration': 4.461}, {'end': 1120.435, 'text': "All right, so now that we have that, let's save it.", 'start': 1118.014, 'duration': 2.421}], 'summary': 'Configuring user as root, leaving host and port blank for default settings.', 'duration': 35.793, 'max_score': 1084.642, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1084642.jpg'}, {'end': 1169.309, 'src': 'heatmap', 'start': 1131.143, 'weight': 0.892, 'content': [{'end': 1135.525, 'text': "All right, so let's go back up here, and I'm just going to quit the server.", 'start': 1131.143, 'duration': 4.382}, {'end': 1146.091, 'text': "And we're going to do python manage.py and then migrate.", 'start': 1136.366, 'duration': 9.725}, {'end': 1148.195, 'text': 'All right.', 'start': 1147.935, 'duration': 0.26}, {'end': 1150.897, 'text': "So it's applying all those migrations and it's applied.", 'start': 1148.235, 'duration': 2.662}, {'end': 1153.759, 'text': "It's created those tables or it should have.", 'start': 1151.277, 'duration': 2.482}, {'end': 1169.309, 'text': "So let's go back down here and let's say down here in MySQL and we'll say use to do list and let's say show tables.", 'start': 1155.84, 'duration': 13.469}], 'summary': 'Applied migrations and created tables in mysql using python manage.py', 'duration': 38.166, 'max_score': 1131.143, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1131143.jpg'}], 'start': 852.206, 'title': 'Mysql setup and database migration', 'summary': 'Covers the drawbacks of sqlite, suggests mysql for production, provides a guide on installing mysql for django, setting up a mysql database for a to-do list, and covering database migration and model creation for admin and authentication, with a to-do model including fields for title and text.', 'chapters': [{'end': 1027.98, 'start': 852.206, 'title': 'Installing mysql for django', 'summary': 'Discusses the drawbacks of using sqlite in production and suggests using either postgres or mysql. it then provides a step-by-step guide on installing mysql and the python mysql module for django development.', 'duration': 175.774, 'highlights': ['SQLite is not recommended for production use due to its limitations in handling large amounts of data.', "It's suggested to use either Postgres or MySQL for production, with MySQL being the focus of the tutorial.", 'The step-by-step guide on installing MySQL includes updating, installing mysql-server, setting a root user password, checking the MySQL service status, and installing the Python MySQL module.', "The process involves running commands like 'sudo apt-get update', 'sudo apt-get install mysql-server', setting a password for the root user, checking the MySQL service status, and installing the Python MySQL module with 'sudo apt-get install python-mysqldb'."]}, {'end': 1120.435, 'start': 1028, 'title': 'Setting up mysql database for to-do list', 'summary': 'Discusses the process of setting up a mysql database for a to-do list, including creating the database, changing settings, and saving the configuration, ensuring successful mysql setup.', 'duration': 92.435, 'highlights': ["The chapter details the process of creating a MySQL database named 'to-do list' and verifying its creation using 'show databases' command.", 'It explains the steps for changing the database settings from SQLite to MySQL, including specifying the database name, user, password, and saving the configuration.', "The chapter also mentions the option for Windows users to use PHPMyAdmin to create a database called 'to-do list', providing an alternative method for database setup."]}, {'end': 1239.629, 'start': 1121.698, 'title': 'Database migration and model creation', 'summary': 'Covers running a migration to create tables for admin and authentication, and creating a to-do model with fields for title and text, with a max length of 200 characters.', 'duration': 117.931, 'highlights': ["The command 'python manage.py migrate' creates tables for admin, authentication, and other necessary elements.", 'The migration creates tables for admin, authentication, and other necessary elements in the database.', 'Creating a to-do model involves defining a class with fields for title and text, specifying the type of fields as char and text, and setting a max length of 200 characters for the title field.']}], 'duration': 387.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw852206.jpg', 'highlights': ['MySQL is recommended for production over SQLite due to limitations in handling large data.', 'Step-by-step guide on installing MySQL includes updating, installing mysql-server, setting a root user password, and installing the Python MySQL module.', "Details the process of creating a MySQL database named 'to-do list' and changing database settings from SQLite to MySQL.", "Command 'python manage.py migrate' creates tables for admin, authentication, and other necessary elements.", 'Creating a to-do model involves defining a class with fields for title and text, specifying the type of fields as char and text, and setting a max length of 200 characters for the title field.']}, {'end': 2211.021, 'segs': [{'end': 1276.351, 'src': 'embed', 'start': 1240.989, 'weight': 7, 'content': [{'end': 1242.71, 'text': "And then we'll also do a created at.", 'start': 1240.989, 'duration': 1.721}, {'end': 1256.876, 'text': "And we'll set that to models dot and let's say date time field.", 'start': 1243.71, 'duration': 13.166}, {'end': 1264.022, 'text': 'that and I want this to be automatically inserted.', 'start': 1259.059, 'duration': 4.963}, {'end': 1267.925, 'text': 'so basically, I want it to just be the current date and time.', 'start': 1264.022, 'duration': 3.903}, {'end': 1269.746, 'text': "so I'm gonna use a package up here.", 'start': 1267.925, 'duration': 1.821}, {'end': 1276.351, 'text': "I'm gonna import a package from date time, which is a Python package,", 'start': 1269.746, 'duration': 6.605}], 'summary': 'Automatically insert current date and time using python package datetime.', 'duration': 35.362, 'max_score': 1240.989, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1240989.jpg'}, {'end': 1396.596, 'src': 'heatmap', 'start': 1348.447, 'weight': 0.838, 'content': [{'end': 1358.053, 'text': 'Todoos.apps.todoosconfig Save that.', 'start': 1348.447, 'duration': 9.606}, {'end': 1362.777, 'text': 'And then for this URL message, I think that pertains to our URLs file.', 'start': 1358.113, 'duration': 4.664}, {'end': 1364.838, 'text': 'This right here.', 'start': 1363.877, 'duration': 0.961}, {'end': 1366.939, 'text': "So I'm just going to comment that out for now.", 'start': 1364.958, 'duration': 1.981}, {'end': 1369.681, 'text': "And let's run that again.", 'start': 1368.2, 'duration': 1.481}, {'end': 1377.026, 'text': 'Okay So it created a migration with this 0001.', 'start': 1369.701, 'duration': 7.325}, {'end': 1396.596, 'text': "So now what we want to do is we want to say python, manage.py, and we're going to say sql, migrate to dos and 0001.", 'start': 1377.026, 'duration': 19.57}], 'summary': 'Commented out url message, ran migration, created 0001 migration, and executed sql migrate to dos and 0001.', 'duration': 48.149, 'max_score': 1348.447, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1348447.jpg'}, {'end': 1660.449, 'src': 'embed', 'start': 1596.206, 'weight': 2, 'content': [{'end': 1604.336, 'text': "Okay, and then we're gonna say admin.site.register, and then just pass in to do.", 'start': 1596.206, 'duration': 8.13}, {'end': 1609.262, 'text': "So let's save that and we're going to reload our admin panel.", 'start': 1606.061, 'duration': 3.201}, {'end': 1611.864, 'text': 'And then if you look here, we have a to do section.', 'start': 1609.362, 'duration': 2.502}, {'end': 1618.386, 'text': 'So those couple of lines of code allowed us to give us all this functionality so we can now add them.', 'start': 1612.384, 'duration': 6.002}, {'end': 1622.068, 'text': "So let's say my to do one.", 'start': 1618.707, 'duration': 3.361}, {'end': 1630.752, 'text': 'This is my first to do in this awesome application.', 'start': 1622.088, 'duration': 8.664}, {'end': 1637.511, 'text': 'And then notice that the date is pre-filled with right now and the time.', 'start': 1633.247, 'duration': 4.264}, {'end': 1639.312, 'text': "And we're going to click save.", 'start': 1637.531, 'duration': 1.781}, {'end': 1644.436, 'text': 'Now notice that right here it just says to do object.', 'start': 1640.673, 'duration': 3.763}, {'end': 1647.218, 'text': 'Now what I want to have is the title here.', 'start': 1645.357, 'duration': 1.861}, {'end': 1650.361, 'text': 'So what we need to do is go into our models file.', 'start': 1647.339, 'duration': 3.022}, {'end': 1660.449, 'text': "And we just need to say right here we'll say def double underscore str double underscore object.", 'start': 1652.583, 'duration': 7.866}], 'summary': 'Using admin.site.register to create a to-do section with pre-filled date and time and saving functionality.', 'duration': 64.243, 'max_score': 1596.206, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1596206.jpg'}, {'end': 1869.421, 'src': 'heatmap', 'start': 1834.955, 'weight': 0.733, 'content': [{'end': 1843.092, 'text': "All right, and then we can define how many we want right here by putting some brackets and we'll say 10.", 'start': 1834.955, 'duration': 8.137}, {'end': 1850.481, 'text': "OK, now we want to pass that into our template as to do's to do's.", 'start': 1843.092, 'duration': 7.389}, {'end': 1853.704, 'text': 'OK, so now we should have access in our template.', 'start': 1850.501, 'duration': 3.203}, {'end': 1855.126, 'text': "So let's go to our template.", 'start': 1853.784, 'duration': 1.342}, {'end': 1860.252, 'text': "And what we want to do is loop through our to do's.", 'start': 1856.047, 'duration': 4.205}, {'end': 1862.434, 'text': "So let's put let's do a UL.", 'start': 1860.592, 'duration': 1.842}, {'end': 1865.898, 'text': "And by the way, I'm not going to work on the front end UI.", 'start': 1863.476, 'duration': 2.422}, {'end': 1869.421, 'text': "I'm not going to use Bootstrap or anything.", 'start': 1866.278, 'duration': 3.143}], 'summary': 'Setting 10 to-dos, passing into template, looping through in ui.', 'duration': 34.466, 'max_score': 1834.955, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1834955.jpg'}, {'end': 1969.813, 'src': 'embed', 'start': 1932.446, 'weight': 6, 'content': [{'end': 1935.427, 'text': 'Actually, you know what? We need to put in all our HTML tags and everything.', 'start': 1932.446, 'duration': 2.981}, {'end': 1938.087, 'text': "So let's see.", 'start': 1936.267, 'duration': 1.82}, {'end': 1942.088, 'text': "I'm going to just take this, put it in here.", 'start': 1938.187, 'duration': 3.901}, {'end': 1946.869, 'text': "And then inside the body, let's say header.", 'start': 1943.868, 'duration': 3.001}, {'end': 1952.11, 'text': "And I'm just going to put in H1.", 'start': 1946.889, 'duration': 5.221}, {'end': 1959.851, 'text': "And then we'll just put in HR.", 'start': 1958.311, 'duration': 1.54}, {'end': 1963.952, 'text': "All right, so there's our header.", 'start': 1959.871, 'duration': 4.081}, {'end': 1969.813, 'text': 'What we want to do next is we want to have a details or a show page for each to-do.', 'start': 1965.452, 'duration': 4.361}], 'summary': 'Creating html page with header, h1, and hr for to-do list', 'duration': 37.367, 'max_score': 1932.446, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1932446.jpg'}, {'end': 2211.021, 'src': 'embed', 'start': 2139.682, 'weight': 0, 'content': [{'end': 2147.746, 'text': "we're gonna set it to this and we want to render a template called details dot HTML.", 'start': 2139.682, 'duration': 8.064}, {'end': 2149.967, 'text': "so save that and we'll create details.", 'start': 2147.746, 'duration': 2.221}, {'end': 2165.48, 'text': "html and let's put in an h1 and we should have access to to do dot title.", 'start': 2154.217, 'duration': 11.263}, {'end': 2167.38, 'text': "so let's save that and try it out.", 'start': 2165.48, 'duration': 1.9}, {'end': 2171.441, 'text': 'okay, looks like we have an issue.', 'start': 2167.38, 'duration': 4.061}, {'end': 2172.902, 'text': 'view is not defined.', 'start': 2171.441, 'duration': 1.461}, {'end': 2182.024, 'text': "alright, see, it's go to URLs and should be views, not view.", 'start': 2172.902, 'duration': 9.122}, {'end': 2190.67, 'text': 'So if I click on one of these, details got an unexpected keyword argument ID.', 'start': 2184.788, 'duration': 5.882}, {'end': 2198.173, 'text': 'Oh, you know what? Since we used ID here, we want to use that here as well, not to do ID.', 'start': 2191.29, 'duration': 6.883}, {'end': 2200.393, 'text': 'And then we also have to change it here.', 'start': 2198.833, 'duration': 1.56}, {'end': 2202.694, 'text': "So let's try that.", 'start': 2201.634, 'duration': 1.06}, {'end': 2204.255, 'text': 'And there we go.', 'start': 2203.594, 'duration': 0.661}, {'end': 2205.675, 'text': 'So now we have a details page.', 'start': 2204.275, 'duration': 1.4}, {'end': 2208.076, 'text': "If we click on my to do to, that's what we get.", 'start': 2205.715, 'duration': 2.361}, {'end': 2211.021, 'text': "Good, so that's exactly what we want.", 'start': 2209.38, 'duration': 1.641}], 'summary': "Resolved issues in rendering 'details.html' template, accessing 'to do' title, and fixing unexpected keyword argument id. now successfully displaying details page for to do items.", 'duration': 71.339, 'max_score': 2139.682, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2139682.jpg'}], 'start': 1240.989, 'title': 'Building to-do list web app with python', 'summary': 'Covers creating a database table and admin user, adding functionality and rendering templates, and building a to-do list web app with python, including key processes and functionalities to manage users, groups, and permissions, display variables in templates, and query to-dos.', 'chapters': [{'end': 1561.128, 'start': 1240.989, 'title': 'Creating database table and admin user', 'summary': 'Explains the process of creating a database table with automatic current date and time insertion, resolving errors like app installation, migration, and creating a super user with the ability to manage users, groups, and permissions.', 'duration': 320.139, 'highlights': ["The chapter covers creating a migration for a database table with automatic current date and time insertion using the 'datetime' Python package.", "It also addresses resolving errors such as app installation and running migrations for the 'to dos' app.", 'The process of creating a super user is explained, including setting username, email, and password, and accessing the admin panel to manage users, groups, and permissions.']}, {'end': 1791.934, 'start': 1561.268, 'title': 'Adding functionality and rendering templates', 'summary': "Demonstrates adding functionality to the to-do application, including registering the to-do model in the admin panel, customizing the display of to-dos, and rendering templates in the front end, allowing the display of variables, like 'name', in the template.", 'duration': 230.666, 'highlights': ['Adding functionality by registering the to-do model in the admin panel The steps involved in registering the to-do model in the admin panel, which allowed the addition of to-dos and pre-filled date and time.', "Customizing the display of to-dos by using the title as the main field Demonstrating how to customize the display of to-dos by defining the __str__ method to use the title as the main field, resulting in the title being displayed instead of 'to do object'.", "Rendering templates in the front end and passing variables The process of rendering a template in the front end by using the render method and passing variables, such as 'name', to the template for display."]}, {'end': 2211.021, 'start': 1791.934, 'title': 'Building to-do list web app with python', 'summary': 'Covers building a to-do list web app using python, including importing models, querying to-dos, passing data to templates, creating urls and views, and displaying details for each to-do item.', 'duration': 419.087, 'highlights': ['Creating URLs and views for the to-do list web app, including setting up routes and creating a function to display details for each to-do item.', 'Importing models and querying to-dos in Python, including fetching all to-dos and passing them to the template.', 'Displaying to-do items in the template using a loop and accessing to-do title and text for each item.', 'Identifying and resolving issues in the code, such as unexpected keyword arguments and incorrect function references.']}], 'duration': 970.032, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw1240989.jpg', 'highlights': ["Covers creating a migration for a database table with automatic current date and time insertion using the 'datetime' Python package.", 'Adding functionality by registering the to-do model in the admin panel, allowing the addition of to-dos and pre-filled date and time.', "Rendering templates in the front end by using the render method and passing variables, such as 'name', to the template for display.", 'Creating URLs and views for the to-do list web app, including setting up routes and creating a function to display details for each to-do item.', 'Importing models and querying to-dos in Python, including fetching all to-dos and passing them to the template.', "Customizing the display of to-dos by defining the __str__ method to use the title as the main field, resulting in the title being displayed instead of 'to do object'.", 'The process of creating a super user is explained, including setting username, email, and password, and accessing the admin panel to manage users, groups, and permissions.', 'Identifying and resolving issues in the code, such as unexpected keyword arguments and incorrect function references.', "It also addresses resolving errors such as app installation and running migrations for the 'to dos' app."]}, {'end': 3060.778, 'segs': [{'end': 2254.946, 'src': 'embed', 'start': 2211.161, 'weight': 5, 'content': [{'end': 2221.349, 'text': "Now let's go back to details HTML and let's put a paragraph tag and that's where we'll put the text, to do dot text.", 'start': 2211.161, 'duration': 10.188}, {'end': 2231.257, 'text': "And let's see, we'll do a line break and then we'll say created, created on to do dot created at.", 'start': 2223.071, 'duration': 8.186}, {'end': 2244.239, 'text': 'Okay, save it, and there we go.', 'start': 2241.397, 'duration': 2.842}, {'end': 2254.946, 'text': "Now notice, if we look at the source code, this doesn't have the HTML tags and all that, and we could put it in here, but that's not gonna work out,", 'start': 2245.88, 'duration': 9.066}], 'summary': 'Creating html content with paragraph and line break tags.', 'duration': 43.785, 'max_score': 2211.161, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2211161.jpg'}, {'end': 2715.851, 'src': 'embed', 'start': 2633.345, 'weight': 2, 'content': [{'end': 2634.526, 'text': "So let's save that.", 'start': 2633.345, 'duration': 1.181}, {'end': 2650.757, 'text': "and now let's see module object has no attribute add views.add.", 'start': 2636.508, 'duration': 14.249}, {'end': 2653.438, 'text': "oh, we didn't create the function in the view.", 'start': 2650.757, 'duration': 2.681}, {'end': 2655.219, 'text': "so let's go to views.py.", 'start': 2653.438, 'duration': 1.781}, {'end': 2664.165, 'text': "okay, we'll say def add request.", 'start': 2655.219, 'duration': 8.946}, {'end': 2666.022, 'text': 'All right.', 'start': 2665.762, 'duration': 0.26}, {'end': 2677.769, 'text': "Now, since we're going to use the add function to load our view, to load the form, and we're also submitting to it as a post request.", 'start': 2666.362, 'duration': 11.407}, {'end': 2681.452, 'text': "So what we can do is let's test to see if it's a post request.", 'start': 2677.809, 'duration': 3.643}, {'end': 2682.552, 'text': "Whoops, that's not right.", 'start': 2681.472, 'duration': 1.08}, {'end': 2687.615, 'text': "To see if it's a post request or a get request.", 'start': 2683.093, 'duration': 4.522}, {'end': 2693.799, 'text': "So we're going to say if request.method is equal to post.", 'start': 2687.635, 'duration': 6.164}, {'end': 2698.64, 'text': "Then we're going to do something else.", 'start': 2696.198, 'duration': 2.442}, {'end': 2702.882, 'text': "Then we're going to do something else.", 'start': 2701.682, 'duration': 1.2}, {'end': 2711.648, 'text': "So if it's not a post request, we're going to just return render request.", 'start': 2702.982, 'duration': 8.666}, {'end': 2715.851, 'text': 'And we want to load the add.html template.', 'start': 2712.769, 'duration': 3.082}], 'summary': "Creating an 'add' function in the views.py to handle post requests for the form submission.", 'duration': 82.506, 'max_score': 2633.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2633345.jpg'}, {'end': 2830.698, 'src': 'embed', 'start': 2791.565, 'weight': 0, 'content': [{'end': 2798.268, 'text': 'So we want to grab the form fields or the values and put those in variables so we can get that from the request object.', 'start': 2791.565, 'duration': 6.703}, {'end': 2799.809, 'text': "And we're going to say .", 'start': 2799.089, 'duration': 0.72}, {'end': 2823.555, 'text': 'post and in here title, and then we want to get text, post text, and then what we can do is say to do equals, and then our model,', 'start': 2799.809, 'duration': 23.746}, {'end': 2830.698, 'text': "and then we're going to pass in title equals title and text equals text.", 'start': 2823.555, 'duration': 7.143}], 'summary': 'Extract form field values to variables for request object', 'duration': 39.133, 'max_score': 2791.565, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2791565.jpg'}, {'end': 2903.902, 'src': 'embed', 'start': 2872.937, 'weight': 3, 'content': [{'end': 2875.058, 'text': 'So you just want to put that in there.', 'start': 2872.937, 'duration': 2.121}, {'end': 2875.898, 'text': 'All right.', 'start': 2875.618, 'duration': 0.28}, {'end': 2877.419, 'text': 'Now it probably still worked.', 'start': 2875.998, 'duration': 1.421}, {'end': 2878.54, 'text': "It just didn't redirect.", 'start': 2877.499, 'duration': 1.041}, {'end': 2879.9, 'text': "So let's go back to to do's.", 'start': 2878.6, 'duration': 1.3}, {'end': 2880.841, 'text': 'And there it is.', 'start': 2880.341, 'duration': 0.5}, {'end': 2882.482, 'text': "Let's try it again.", 'start': 2880.861, 'duration': 1.621}, {'end': 2890.472, 'text': 'and submit, and there we go, another test.', 'start': 2887.97, 'duration': 2.502}, {'end': 2893.675, 'text': 'Okay, so we can now submit to-dos from the front end.', 'start': 2891.213, 'duration': 2.462}, {'end': 2903.902, 'text': "And if we were to go to our admin area and go to to-dos, you'll see that those are all listed here.", 'start': 2895.496, 'duration': 8.406}], 'summary': 'Front end now allows submission of to-dos, reflected in admin area.', 'duration': 30.965, 'max_score': 2872.937, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2872937.jpg'}, {'end': 2977.338, 'src': 'embed', 'start': 2937.557, 'weight': 1, 'content': [{'end': 2939.397, 'text': "Basically, we're overwriting it with this.", 'start': 2937.557, 'duration': 1.84}, {'end': 2942.038, 'text': 'Now, you can change certain parts of it.', 'start': 2940.138, 'duration': 1.9}, {'end': 2947.639, 'text': "So let's put here block branding.", 'start': 2942.178, 'duration': 5.461}, {'end': 2951.42, 'text': 'And this is all in the documentation.', 'start': 2949.64, 'duration': 1.78}, {'end': 2959.682, 'text': "And then we'll say end block.", 'start': 2954.761, 'duration': 4.921}, {'end': 2962.302, 'text': "Actually, that's all one word.", 'start': 2961.142, 'duration': 1.16}, {'end': 2964.983, 'text': 'And then this is basically.', 'start': 2963.242, 'duration': 1.741}, {'end': 2969.915, 'text': 'the H1 at the top that says site administration.', 'start': 2966.994, 'duration': 2.921}, {'end': 2971.616, 'text': "So we're going to give this an ID.", 'start': 2969.935, 'duration': 1.681}, {'end': 2977.338, 'text': 'Give this an ID of site name.', 'start': 2973.557, 'duration': 3.781}], 'summary': 'Overwriting with block branding in documentation, giving an id of site name.', 'duration': 39.781, 'max_score': 2937.557, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2937557.jpg'}], 'start': 2211.161, 'title': 'Django web development', 'summary': 'Covers creating partial templates, static resource inclusion, building a crud application with backend and admin login, submitting forms, customizing admin panel, and handling post and get requests.', 'chapters': [{'end': 2764.889, 'start': 2211.161, 'title': 'Creating partial templates and including static resources', 'summary': 'Demonstrates creating partial templates to include in the main templates, a complete crud application with a back end, an admin and admin login, and including static resources such as css files.', 'duration': 553.728, 'highlights': ['Complete CRUD application with a back end, admin, and admin login The chapter demonstrates creating a complete CRUD application with a back end, admin, and admin login, allowing resources to be created from the front end.', 'Creating partial templates to include in main templates The chapter explains the process of creating partial templates to include in the main templates, using header and footer as examples.', "Including static resources such as CSS files The chapter demonstrates including static resources like CSS files, by creating a folder called 'static' and a file 'style.css' to add styling to the application."]}, {'end': 3060.778, 'start': 2764.909, 'title': 'Django form submission and admin customization', 'summary': 'Explains the process of submitting a form in django, customizing the admin panel, and redirecting to-dos, emphasizing the use of post and get requests as well as the creation of custom admin templates.', 'duration': 295.869, 'highlights': ['Explaining the process of submitting a form in Django and redirecting to-dos The process of submitting a form in Django and redirecting to-dos is explained, showcasing the use of post and get requests.', 'Customizing the admin panel in Django by creating a new folder and file for the template The customization of the admin panel in Django by creating a new folder and file for the template is detailed, providing insight into the process of overwriting and extending the core template.', 'Emphasizing the ease of working with Django and its suitability for quick development The emphasis on the ease of working with Django and its suitability for quick development is highlighted, reflecting the positive experience with the system.']}], 'duration': 849.617, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2yXfUPwlZTw/pics/2yXfUPwlZTw2211161.jpg', 'highlights': ['Complete CRUD application with a back end, admin, and admin login', 'Creating partial templates to include in main templates', 'Including static resources such as CSS files', 'Explaining the process of submitting a form in Django and redirecting to-dos', 'Customizing the admin panel in Django by creating a new folder and file for the template', 'Emphasizing the ease of working with Django and its suitability for quick development']}], 'highlights': ['Django is designed to simplify web development and promote rapid development, which can be beneficial for creating applications efficiently.', 'The practical demonstration of building a to-do list showcases the real-world application of Django using the administration panel for creating and managing tasks.', "Explains the MVT design pattern used by Django, which involves models, database linkage, and logic in the view file, offering insights into the framework's architecture.", 'The chapter demonstrates the process of installing Django on Ubuntu, including updating the package manager, installing pip, and checking the installation using specific commands and versions.', "Creating a Django application in a Linux environment by using Django admin and starting a project named 'to-do list'.", 'Exploring the structure and key components of the Django project, such as settings, URLs, WSGI, and static files.', 'Setting up a virtual environment for managing Python applications is recommended for extensive Python development.', 'The chapter emphasizes creating modules in Python, such as a to-dos module, using manage.py, which generates a folder structure with admin, models, tests, views, and migrations.', "Setting up routes and views for a to-do's app using Django to create an index page for the app and connect to a database.", "The chapter explains the process of running the server on localhost port 8000 using the command 'python manage.py runserver'.", 'Defining views and importing HTTP response in Django to handle requests and send HTTP responses, ensuring the functionality of the app.', 'MySQL is recommended for production over SQLite due to limitations in handling large data.', 'Step-by-step guide on installing MySQL includes updating, installing mysql-server, setting a root user password, and installing the Python MySQL module.', "Details the process of creating a MySQL database named 'to-do list' and changing database settings from SQLite to MySQL.", "Command 'python manage.py migrate' creates tables for admin, authentication, and other necessary elements.", 'Creating a to-do model involves defining a class with fields for title and text, specifying the type of fields as char and text, and setting a max length of 200 characters for the title field.', "Covers creating a migration for a database table with automatic current date and time insertion using the 'datetime' Python package.", 'Adding functionality by registering the to-do model in the admin panel, allowing the addition of to-dos and pre-filled date and time.', "Rendering templates in the front end by using the render method and passing variables, such as 'name', to the template for display.", 'Creating URLs and views for the to-do list web app, including setting up routes and creating a function to display details for each to-do item.', 'Importing models and querying to-dos in Python, including fetching all to-dos and passing them to the template.', "Customizing the display of to-dos by defining the __str__ method to use the title as the main field, resulting in the title being displayed instead of 'to do object'.", 'The process of creating a super user is explained, including setting username, email, and password, and accessing the admin panel to manage users, groups, and permissions.', 'Identifying and resolving issues in the code, such as unexpected keyword arguments and incorrect function references.', "It also addresses resolving errors such as app installation and running migrations for the 'to dos' app.", 'Complete CRUD application with a back end, admin, and admin login', 'Creating partial templates to include in main templates', 'Including static resources such as CSS files', 'Explaining the process of submitting a form in Django and redirecting to-dos', 'Customizing the admin panel in Django by creating a new folder and file for the template', 'Emphasizing the ease of working with Django and its suitability for quick development']}