title
Python Django Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server
description
In this Python Django Tutorial, we will be learning how to deploy our application to a Linux Server from scratch using Linode.
If you would like $20 of free credit towards a Linode account, then you can use my link here to sign up:
https://linode.com/coreyschafer
We will be covering the entire deployment of a Django application. This includes spinning up a new Linux Server and tightening its security with SSH keys and firewalls. Then we will install Apache and Mod_WSGI so that we can get our Django App running. Let's get started...
To skip the server setup, jump to 29:11
How to Run Linux/Bash on Windows: https://youtu.be/xzgwDbe7foQ
SSH Key-Based Authentication Tutorial: https://youtu.be/vpk_1gldOAE
SSH Keys on Windows: https://www.linode.com/docs/security/authentication/use-public-key-authentication-with-ssh/#windows
Apache config used in this video: https://github.com/CoreyMSchafer/code_snippets/blob/master/Django_Blog/snippets/django_project.conf
✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms
✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join
✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/
#Python #Django
detail
{'title': 'Python Django Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server', 'heatmap': [{'end': 3249.789, 'start': 3148.807, 'weight': 1}, {'end': 4095.771, 'start': 4027.152, 'weight': 0.788}], 'summary': 'This tutorial series covers deploying django applications to a linux server, using linode as the hosting provider with a $20 free credit offer, and includes setting up the server, ssh and firewall, configuring the django project on the web server, setting up apache, deploying the django project, and addressing production environment considerations.', 'chapters': [{'end': 231.313, 'segs': [{'end': 91.816, 'src': 'embed', 'start': 16.92, 'weight': 0, 'content': [{'end': 21.864, 'text': 'Right now this is just running in my browser on my local machine, but no one else can access this.', 'start': 16.92, 'duration': 4.944}, {'end': 26.727, 'text': "So the point of building these sites is to deploy them so that they're accessible over the internet.", 'start': 22.224, 'duration': 4.503}, {'end': 29.669, 'text': "Now look, I'm not going to lie to you, deploying is a bit tricky.", 'start': 27.047, 'duration': 2.622}, {'end': 36.173, 'text': "You can find a lot of Django tutorials online, but not many of those cover deployments, and that's because they can be difficult.", 'start': 30.169, 'duration': 6.004}, {'end': 37.634, 'text': 'It can be overwhelming,', 'start': 36.733, 'duration': 0.901}, {'end': 43.338, 'text': "because there's a lot of different ways to deploy an application and it's hard to know what's best for your specific application.", 'start': 37.634, 'duration': 5.704}, {'end': 46.74, 'text': "So we're going to look at several deployment options in this series.", 'start': 43.858, 'duration': 2.882}, {'end': 54.665, 'text': "So we'll look at how to deploy to your own Linux server, how to deploy to Heroku, how to deploy to Python anywhere, and possibly some others.", 'start': 47.06, 'duration': 7.605}, {'end': 58.708, 'text': "In this video, we'll be learning how to deploy our application to our own Linux server.", 'start': 55.045, 'duration': 3.663}, {'end': 65.515, 'text': "so when you deploy to a linux server, you're most likely going to be deploying to a virtual machine that is hosted by a company.", 'start': 59.088, 'duration': 6.427}, {'end': 70.42, 'text': "so that's going to be a company like linode or digital ocean or aws.", 'start': 65.515, 'duration': 4.905}, {'end': 73.464, 'text': 'i personally use linode for my own web applications.', 'start': 70.42, 'duration': 3.044}, {'end': 75.246, 'text': "so that's what we're going to be using in this video,", 'start': 73.464, 'duration': 1.782}, {'end': 83.871, 'text': 'And Linode was actually kind enough to sponsor this video and has provided me with a link where you can get $20 of free credit towards an account.', 'start': 75.926, 'duration': 7.945}, {'end': 88.774, 'text': "So if you want to follow along with this video, then I'll leave that link in the description section below,", 'start': 84.351, 'duration': 4.423}, {'end': 91.816, 'text': 'where you can sign up for an account and get enough credit to follow along.', 'start': 88.774, 'duration': 3.042}], 'summary': 'Learning deployment options, including deploying to own linux server, sponsored by linode.', 'duration': 74.896, 'max_score': 16.92, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds16920.jpg'}, {'end': 189.266, 'src': 'embed', 'start': 159.548, 'weight': 4, 'content': [{'end': 164.451, 'text': 'So the correction that needs to be made is in our users models.py file.', 'start': 159.548, 'duration': 4.903}, {'end': 167.473, 'text': "So I'm going to open that up really quick and make a quick change.", 'start': 164.771, 'duration': 2.702}, {'end': 170.715, 'text': 'So I have my application open here in Sublime Text.', 'start': 167.833, 'duration': 2.882}, {'end': 174.457, 'text': 'And this was in, let me maximize this here.', 'start': 171.175, 'duration': 3.282}, {'end': 177.339, 'text': 'This was in our users app here.', 'start': 174.817, 'duration': 2.522}, {'end': 180, 'text': 'And this was in models.py.', 'start': 177.759, 'duration': 2.241}, {'end': 183.883, 'text': 'And the mistake that I made was down here in our save method.', 'start': 181.241, 'duration': 2.642}, {'end': 189.266, 'text': "So when we're calling the save method on our parent class this super.save,", 'start': 184.463, 'duration': 4.803}], 'summary': 'Correction needed in users models.py file, mistake in save method', 'duration': 29.718, 'max_score': 159.548, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds159548.jpg'}], 'start': 0.229, 'title': 'Deploying django applications to linux server', 'summary': 'Discusses the importance of deploying django applications to a web server, explores challenges and deployment options, focuses on deploying to a linux server, and offers insights into using linode as the hosting provider with a $20 free credit offer. it also highlights the benefits of deploying to a linux server, emphasizing flexibility and control over application and web servers. additionally, it covers the correction needed in the django code before deployment, involving a modification in the users models.py file.', 'chapters': [{'end': 91.816, 'start': 0.229, 'title': 'Deploying django application to linux server', 'summary': 'Discusses the importance of deploying django applications to a web server for internet accessibility, explores the challenges and multiple deployment options, and focuses on deploying to a linux server with insights into using linode as the hosting provider and a $20 free credit offer for the audience.', 'duration': 91.587, 'highlights': ['Deploying Django applications to a web server is essential for internet accessibility, as the current setup only allows access on the local machine.', 'The process of deployment is challenging and less covered in online tutorials, as it involves various options and considerations tailored to specific applications.', 'The tutorial series will cover deployment options including deploying to Linux server, Heroku, Python anywhere, and possibly other platforms, providing a comprehensive understanding of different deployment methods.', 'Deploying to a Linux server typically involves deploying to a virtual machine hosted by companies like Linode, Digital Ocean, or AWS, with the tutorial focusing on using Linode for deployment.', 'The video is sponsored by Linode, offering the audience $20 of free credit towards an account, enabling them to follow along with the deployment process.']}, {'end': 142.997, 'start': 92.196, 'title': 'Deploying to a linux server', 'summary': 'Discusses the benefits of deploying to a linux server, highlighting the flexibility and control it offers over application and web servers, compared to free tier options which only offer basic services and limited freedom.', 'duration': 50.801, 'highlights': ['The method of deploying to a Linux server offers the most flexibility and control over the application and web server, compared to free tier options. This allows for greater freedom and possibilities for the application to grow.', 'Free deployment options usually only offer basic services and require upgrading to a paid service for using a custom domain name, such as myjangoblog.com, limiting the freedom and possibilities compared to having your own virtual private server.', 'Using a virtual private server for deployment provides a lot of freedom and room for the application to grow, offering more possibilities and control compared to free deployment options.']}, {'end': 231.313, 'start': 142.997, 'title': 'Django deployment correction', 'summary': 'Highlights the correction needed in the django code before deployment, involving a modification in the users models.py file to resolve issues encountered during application deployment.', 'duration': 88.316, 'highlights': ['The correction needed in the Django code before deployment involves modifying the users models.py file to resolve issues encountered during application deployment.', 'The mistake that needs to be rectified is in the save method of the parent class, requiring the acceptance of any other arguments the parent class might expect.', 'The convention of passing args and quarks to the function allows for the acceptance of any arbitrary number of positional or keyword arguments, aiding in resolving issues during application deployment.']}], 'duration': 231.084, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds229.jpg', 'highlights': ['Deploying to a Linux server offers flexibility and control over the application and web server', 'Deploying Django applications to a web server is essential for internet accessibility', 'The tutorial series covers comprehensive deployment options including Linux server, Heroku, and Python anywhere', 'Linode offers $20 free credit towards an account for following along with the deployment process', 'Modifying the users models.py file is necessary to resolve issues encountered during application deployment']}, {'end': 715.444, 'segs': [{'end': 259.836, 'src': 'embed', 'start': 231.933, 'weight': 0, 'content': [{'end': 235.537, 'text': "Okay, so with that correction in place, let's now deploy our application.", 'start': 231.933, 'duration': 3.604}, {'end': 239.82, 'text': "So like I said, I'm going to be using Linode to deploy this application to a Linux server.", 'start': 235.857, 'duration': 3.963}, {'end': 247.147, 'text': "That's my personal preference, but you can do this same deployment with any Linux server that you can access via SSH.", 'start': 240.161, 'duration': 6.986}, {'end': 252.632, 'text': 'Now, I already have an account with Linode, so let me go ahead and pull that up here in my browser.', 'start': 247.567, 'duration': 5.065}, {'end': 255.595, 'text': "So I have a tab open here, and I'll refresh this page.", 'start': 252.872, 'duration': 2.723}, {'end': 259.836, 'text': 'So if you create an account with them, then you should be able to access a page like this as well.', 'start': 256.135, 'duration': 3.701}], 'summary': 'Deploying application using linode to a linux server via ssh.', 'duration': 27.903, 'max_score': 231.933, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds231933.jpg'}, {'end': 316.821, 'src': 'embed', 'start': 290.313, 'weight': 1, 'content': [{'end': 296.12, 'text': "So first I'm going to come up here to create and we're going to click on create and we want to create a new Linode.", 'start': 290.313, 'duration': 5.807}, {'end': 303.028, 'text': 'Linode is their name for their, you can see here it says high performance SSD Linux servers for all your infrastructure needs.', 'start': 296.461, 'duration': 6.567}, {'end': 305.37, 'text': "So we're going to click on that to create a new Linux server.", 'start': 303.048, 'duration': 2.322}, {'end': 309.574, 'text': 'And now we need to select what image we want to create with this server.', 'start': 305.691, 'duration': 3.883}, {'end': 316.821, 'text': "So I'm going to use Ubuntu server in this video, but depending on what your preference is, you can use any of these.", 'start': 309.875, 'duration': 6.946}], 'summary': 'Creating a new linode server using ubuntu for infrastructure needs.', 'duration': 26.508, 'max_score': 290.313, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds290313.jpg'}, {'end': 353.355, 'src': 'embed', 'start': 331.407, 'weight': 2, 'content': [{'end': 339.749, 'text': 'So depending on where people are going to be accessing your application, you might want the server to be served up to them from a close location.', 'start': 331.407, 'duration': 8.342}, {'end': 342.57, 'text': "So for this application here, I'm just going to choose Dallas, Texas.", 'start': 340.069, 'duration': 2.501}, {'end': 343.11, 'text': "That's fine.", 'start': 342.59, 'duration': 0.52}, {'end': 349.251, 'text': 'So down here for the Linode plan, this is where you pick how much performance you want in your machine.', 'start': 343.69, 'duration': 5.561}, {'end': 351.633, 'text': 'And you can see the prices are attached here.', 'start': 349.651, 'duration': 1.982}, {'end': 353.355, 'text': 'So this one is $10 a month.', 'start': 351.713, 'duration': 1.642}], 'summary': 'Consider server location for better access. dallas, texas chosen. linode plan offers $10/month.', 'duration': 21.948, 'max_score': 331.407, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds331407.jpg'}, {'end': 392.539, 'src': 'embed', 'start': 368.911, 'weight': 5, 'content': [{'end': 376.814, 'text': "But it's only $5 a month and our application, especially if you're just testing, most likely isn't going to be very intensive.", 'start': 368.911, 'duration': 7.903}, {'end': 381.515, 'text': "So I'm just going to pick their cheapest option for deploying our Django application.", 'start': 376.954, 'duration': 4.561}, {'end': 383.416, 'text': 'Now you can always resize these later.', 'start': 381.795, 'duration': 1.621}, {'end': 385.737, 'text': 'So I just suggest going small at first.', 'start': 383.436, 'duration': 2.301}, {'end': 392.539, 'text': "And if you want to bump it up to something bigger, depending on how much traffic you're getting, then you can do that at a later time.", 'start': 385.817, 'duration': 6.722}], 'summary': 'Deploy django app for $5/month, resize later based on traffic.', 'duration': 23.628, 'max_score': 368.911, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds368911.jpg'}, {'end': 450.51, 'src': 'embed', 'start': 426.394, 'weight': 3, 'content': [{'end': 432.639, 'text': "because this is a root password on your server and you're definitely going to need to know it whenever you first log into your computer.", 'start': 426.394, 'duration': 6.245}, {'end': 438.084, 'text': 'so you know, definitely remember this for later, because we are going to be using that.', 'start': 432.639, 'duration': 5.445}, {'end': 444.128, 'text': "so now that we have that, I'm just going to go over here and click create, And now it's going to create our server for us.", 'start': 438.084, 'duration': 6.044}, {'end': 450.51, 'text': 'So you can see here that our Django server, it says that it is provisioning the server and now it is booting up.', 'start': 444.448, 'duration': 6.062}], 'summary': 'Setting up a root password for server, creating django server, and provisioning the server.', 'duration': 24.116, 'max_score': 426.394, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds426394.jpg'}, {'end': 537.429, 'src': 'embed', 'start': 510.932, 'weight': 6, 'content': [{'end': 515.294, 'text': 'there are other tools that you can use that allow you to ssh into a server.', 'start': 510.932, 'duration': 4.362}, {'end': 519.217, 'text': 'So one of the more popular ones is called Putty, and I have it here on.', 'start': 515.655, 'duration': 3.562}, {'end': 520.878, 'text': 'I have their website pulled up here.', 'start': 519.217, 'duration': 1.661}, {'end': 522.62, 'text': "It's at putty.org.", 'start': 520.898, 'duration': 1.722}, {'end': 526.842, 'text': 'And they have documentation in here of how you can SSH into a server.', 'start': 522.94, 'duration': 3.902}, {'end': 531.665, 'text': "But personally, what I would recommend on Windows, if you're on a newer version of Windows,", 'start': 527.383, 'duration': 4.282}, {'end': 537.429, 'text': "is to simply install the Linux Bash shell on Windows and you're able to use SSH through that.", 'start': 531.665, 'duration': 5.764}], 'summary': 'Putty is a popular tool for ssh, but windows 10 can use linux bash for ssh.', 'duration': 26.497, 'max_score': 510.932, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds510932.jpg'}, {'end': 707.942, 'src': 'embed', 'start': 676.365, 'weight': 4, 'content': [{'end': 684.13, 'text': "Now, I'm actually going to minimize this right side here and expand this over so that we have more room to work with here on our server.", 'start': 676.365, 'duration': 7.765}, {'end': 696.939, 'text': "So to do this, now remember, I'm on Ubuntu, so I'll say apt-get update, and then I will also type in these two ampersands, and then apt-get upgrade.", 'start': 685.011, 'duration': 11.928}, {'end': 707.942, 'text': 'and let me make sure I spelled that right and this is just going to go through and update our machine and make sure that we have all the latest security patches and things like that.', 'start': 698.219, 'duration': 9.723}], 'summary': 'Updating ubuntu server for security with apt-get update && apt-get upgrade.', 'duration': 31.577, 'max_score': 676.365, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds676365.jpg'}], 'start': 231.933, 'title': 'Deploying django application on linode', 'summary': "Covers deploying a django application on a linode linux server, including creating a new server, selecting ubuntu as the image, choosing the server plan based on performance and price, setting the root password, and updating the server's software.", 'chapters': [{'end': 368.531, 'start': 231.933, 'title': 'Deploying django application on linode', 'summary': 'Discusses deploying a django application on a linode linux server, including creating a new server, selecting ubuntu as the image, and choosing the server plan based on performance and price.', 'duration': 136.598, 'highlights': ['Creating a new Linode server from scratch to deploy the Django application.', 'Selecting Ubuntu as the image for the server, with options for CentOS and Fedora as well.', 'Choosing the server plan based on performance and price, with options ranging from $10 to $20 per month.']}, {'end': 715.444, 'start': 368.911, 'title': 'Deploying django application on linode', 'summary': "Details the process of deploying a django application on linode, including selecting the cheapest option, setting the root password, creating and accessing the server, and updating the server's software.", 'duration': 346.533, 'highlights': ['The chapter details the process of deploying a Django application on Linode.', 'Selecting the cheapest option for deploying the Django application at $5 a month.', 'Setting the root password on the server to ensure security.', 'Accessing the server using SSH command and addressing the use of Putty for Windows users.', "Updating the server's software by running 'apt-get update' and 'apt-get upgrade'."]}], 'duration': 483.511, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds231933.jpg', 'highlights': ['Deploying a Django application on Linode with Ubuntu image.', 'Creating a new Linode server from scratch for deployment.', 'Selecting server plan based on performance and price.', 'Setting root password on the server for security.', "Updating server's software with 'apt-get update' and 'apt-get upgrade'.", 'Selecting the cheapest option for deploying the Django application at $5 a month.', 'Accessing the server using SSH command and addressing the use of Putty for Windows users.']}, {'end': 1461.61, 'segs': [{'end': 803.348, 'src': 'embed', 'start': 741.922, 'weight': 3, 'content': [{'end': 745.525, 'text': "So I'm just going to say django-server here for this machine.", 'start': 741.922, 'duration': 3.603}, {'end': 750.846, 'text': 'And we can check that that worked by typing in hostname, and we should get Django server there.', 'start': 746.025, 'duration': 4.821}, {'end': 754.807, 'text': 'Now remember, I did use Ubuntu for the operating system for this example.', 'start': 751.166, 'duration': 3.641}, {'end': 760.249, 'text': 'But if you are using something like CentOS or Red Hat, then some of these commands are going to be different.', 'start': 755.268, 'duration': 4.981}, {'end': 767.391, 'text': "So you're going to have to map the differences between those if you're using a different operating system than what I'm using here in this tutorial.", 'start': 760.269, 'duration': 7.122}, {'end': 770.912, 'text': 'Okay, so now we also need to set the host name in the host file.', 'start': 767.751, 'duration': 3.161}, {'end': 776.674, 'text': "So to do this, I'm just going to use nano because nano is a simple editor that most people know how to use.", 'start': 771.272, 'duration': 5.402}, {'end': 783.177, 'text': "So I'm going to say nano and this is in the etc directory and this file called host.", 'start': 776.994, 'duration': 6.183}, {'end': 788.508, 'text': "So I'm going to nano on that and underneath this 127.0.", 'start': 783.497, 'duration': 5.011}, {'end': 793.541, 'text': '0.1 I am going to put in the IP address of our server.', 'start': 788.508, 'duration': 5.033}, {'end': 799.205, 'text': "Now you're going to need that IP address a lot, so it would probably be a good idea just to write it down.", 'start': 793.862, 'duration': 5.343}, {'end': 803.348, 'text': 'Now this is the IP address that we used in our SSH command.', 'start': 799.905, 'duration': 3.443}], 'summary': 'Setting up django server on ubuntu, with commands and instructions for different operating systems.', 'duration': 61.426, 'max_score': 741.922, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds741922.jpg'}, {'end': 874.795, 'src': 'embed', 'start': 849.326, 'weight': 2, 'content': [{'end': 856.928, 'text': "Now that might sound nice, but it's best practice to add a new user that has limited privileges that you can use as your main account.", 'start': 849.326, 'duration': 7.602}, {'end': 860.689, 'text': "And you'll still be able to run admin commands using the sudo command.", 'start': 857.288, 'duration': 3.401}, {'end': 862.489, 'text': "So let's add this limited user.", 'start': 860.969, 'duration': 1.52}, {'end': 865.05, 'text': "So I'm going to say add user.", 'start': 862.75, 'duration': 2.3}, {'end': 871.492, 'text': "And the user that I'm going to create is going to be Corey MS. Now you can put whatever username you want here.", 'start': 865.63, 'duration': 5.862}, {'end': 874.795, 'text': 'So I will hit enter there.', 'start': 872.453, 'duration': 2.342}], 'summary': 'Best practice to add a new limited user for admin commands.', 'duration': 25.469, 'max_score': 849.326, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds849326.jpg'}, {'end': 1044.279, 'src': 'embed', 'start': 1002.995, 'weight': 0, 'content': [{'end': 1013.422, 'text': "Well, the reason that we're doing all of this is because I want to show you what it's like to deploy a real world application and to put the proper precautions in place on your server from scratch.", 'start': 1002.995, 'duration': 10.427}, {'end': 1018.785, 'text': 'So that includes best practices like setting up SSH keys and firewalls and things like that.', 'start': 1013.742, 'duration': 5.043}, {'end': 1022.847, 'text': "You're going to want to do that on any real world application that you deploy.", 'start': 1019.365, 'duration': 3.482}, {'end': 1026.99, 'text': 'So I may as well include it in this tutorial instead of just showing you the bare minimum.', 'start': 1023.228, 'duration': 3.762}, {'end': 1034.694, 'text': "So right now, the next best practice that we're going to put in place is using SSH key-based authentication to log in instead of passwords.", 'start': 1027.41, 'duration': 7.284}, {'end': 1038.976, 'text': "So by default, we're using a password to log in to our web server.", 'start': 1035.074, 'duration': 3.902}, {'end': 1044.279, 'text': "We instead want to use key-based authentication, and that's more secure and more convenient,", 'start': 1039.376, 'duration': 4.903}], 'summary': 'Tutorial demonstrating best practices for deploying real world applications, including ssh key-based authentication for security and convenience.', 'duration': 41.284, 'max_score': 1002.995, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1002995.jpg'}], 'start': 715.444, 'title': 'Ubuntu server setup', 'summary': 'Covers setting up hostname and host file, including commands for other os, and implementing limited user with sudo privileges and ssh key-based authentication, emphasizing real-world application deployment best practices.', 'chapters': [{'end': 827.9, 'start': 715.444, 'title': 'Setting up hostname and host file in ubuntu', 'summary': "Covers setting the hostname using 'hostnamectl set-hostname' and updating the host file in ubuntu, while also acknowledging differences in commands for other operating systems.", 'duration': 112.456, 'highlights': ["Hostname is set using 'hostnamectl set-hostname' command, with an example of setting the hostname as 'django-server'.", "Instructions are provided for updating the host file using the 'nano' editor in the etc directory.", 'Differences in commands for setting hostname and host file in operating systems like CentOS or Red Hat are acknowledged.']}, {'end': 1461.61, 'start': 828.42, 'title': 'Setting up limited user and ssh key-based authentication', 'summary': 'Demonstrates setting up a limited user with sudo privileges and implementing ssh key-based authentication for secure and convenient access to the server, emphasizing best practices for deploying real-world applications.', 'duration': 633.19, 'highlights': ['Setting up a limited user with sudo privileges', 'Implementing SSH key-based authentication for secure server access', 'Emphasizing best practices for deploying real-world applications']}], 'duration': 746.166, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds715444.jpg', 'highlights': ['Emphasizing best practices for deploying real-world applications', 'Implementing SSH key-based authentication for secure server access', 'Setting up a limited user with sudo privileges', 'Differences in commands for setting hostname and host file in operating systems like CentOS or Red Hat are acknowledged', "Instructions are provided for updating the host file using the 'nano' editor in the etc directory", "Hostname is set using 'hostnamectl set-hostname' command, with an example of setting the hostname as 'django-server'"]}, {'end': 2044.107, 'segs': [{'end': 1530.132, 'src': 'embed', 'start': 1486.104, 'weight': 0, 'content': [{'end': 1492.106, 'text': 'so our ssh keys are now working, and that is also more secure than using a password as well.', 'start': 1486.104, 'duration': 6.002}, {'end': 1494.327, 'text': "okay, so we're just about finished up with the ssh stuff,", 'start': 1492.106, 'duration': 2.221}, {'end': 1499.751, 'text': "But there's a couple of more things that are best practices to change here before we finish this out.", 'start': 1494.747, 'duration': 5.004}, {'end': 1505.515, 'text': 'So first of all, we want to not allow root logins.', 'start': 1500.571, 'duration': 4.944}, {'end': 1508.578, 'text': 'We just want to be able to log in as our users.', 'start': 1505.575, 'duration': 3.003}, {'end': 1516.804, 'text': "And we also don't want to allow password authentication because we just want to be able to log in with key based authentication.", 'start': 1508.978, 'duration': 7.826}, {'end': 1520.647, 'text': "And if somebody needs a password, then it means that they don't have the keys that they need.", 'start': 1517.164, 'duration': 3.483}, {'end': 1522.948, 'text': "So let's just disallow that altogether.", 'start': 1521.007, 'duration': 1.941}, {'end': 1526.87, 'text': 'And we can do that within the ssh-config file.', 'start': 1523.388, 'duration': 3.482}, {'end': 1530.132, 'text': 'So that is in the location and you have to use sudo here.', 'start': 1527.21, 'duration': 2.922}], 'summary': 'Ssh keys are more secure than passwords, disallow root logins and password authentication for better security.', 'duration': 44.028, 'max_score': 1486.104, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1486104.jpg'}, {'end': 1630.181, 'src': 'embed', 'start': 1583.113, 'weight': 3, 'content': [{'end': 1590.059, 'text': 'so in nano, you hit control x and then a y to save and then enter, just to keep the same file name.', 'start': 1583.113, 'duration': 6.946}, {'end': 1592.741, 'text': 'and now we need to restart the ssh service.', 'start': 1590.059, 'duration': 2.682}, {'end': 1599.748, 'text': 'so we can do that with sudo systemctl restart sshd.', 'start': 1592.741, 'duration': 7.007}, {'end': 1603.453, 'text': "so let's run that and that should have restarted our ssh service.", 'start': 1599.748, 'duration': 3.705}, {'end': 1606.016, 'text': "okay, so we're almost ready to push our django application.", 'start': 1603.453, 'duration': 2.563}, {'end': 1609.661, 'text': "there's just one more thing that we're going to do, and that is setting up a firewall.", 'start': 1606.016, 'duration': 3.645}, {'end': 1612.345, 'text': 'but this is going to be very quick.', 'start': 1609.661, 'duration': 2.684}, {'end': 1614.448, 'text': 'so first we need to install something.', 'start': 1612.345, 'duration': 2.103}, {'end': 1615.369, 'text': "so i'm going to clear my screen.", 'start': 1614.448, 'duration': 0.921}, {'end': 1622.274, 'text': "So let's say sudo, apt-get and we're going to install something called UFW.", 'start': 1615.749, 'duration': 6.525}, {'end': 1625.857, 'text': 'And UFW stands for uncomplicated firewall.', 'start': 1622.595, 'duration': 3.262}, {'end': 1630.181, 'text': 'This is a lot easier than using like IP tables or something like that.', 'start': 1626.018, 'duration': 4.163}], 'summary': 'Restarted ssh service and installed ufw for firewall setup.', 'duration': 47.068, 'max_score': 1583.113, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1583113.jpg'}, {'end': 1822.916, 'src': 'embed', 'start': 1796.32, 'weight': 5, 'content': [{'end': 1804.146, 'text': "then you're going to want to create a requirements.txt file that captures everything that we need to install for our Django application to work.", 'start': 1796.32, 'duration': 7.826}, {'end': 1813.512, 'text': "Now, I was using a virtual environment for this series, so I'm going to activate that and then create a requirements.txt file from that environment.", 'start': 1804.526, 'duration': 8.986}, {'end': 1817.654, 'text': 'So I am going to activate my virtual environment.', 'start': 1813.932, 'duration': 3.722}, {'end': 1822.916, 'text': "So I'm going to say source and that environment lives on my desktop.", 'start': 1817.974, 'duration': 4.942}], 'summary': 'Create requirements.txt file for django app installation.', 'duration': 26.596, 'max_score': 1796.32, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1796320.jpg'}, {'end': 2017.951, 'src': 'embed', 'start': 1989.526, 'weight': 6, 'content': [{'end': 1992.429, 'text': 'And that project is called Django underscore project.', 'start': 1989.526, 'duration': 2.903}, {'end': 1996.313, 'text': "So now I'm going to say SCP, which will copy.", 'start': 1992.75, 'duration': 3.563}, {'end': 1999.857, 'text': 'And we need a dash R here to do a recursive copy.', 'start': 1996.473, 'duration': 3.384}, {'end': 2001.538, 'text': 'That means that we can copy a directory.', 'start': 1999.897, 'duration': 1.641}, {'end': 2006.463, 'text': 'So now I will do Django underscore project.', 'start': 2002.239, 'duration': 4.224}, {'end': 2009.006, 'text': "That's what we want to copy to our server.", 'start': 2006.543, 'duration': 2.463}, {'end': 2013.589, 'text': 'And we want to copy this to QueryMS at.', 'start': 2009.646, 'duration': 3.943}, {'end': 2016.23, 'text': 'Now you want to use whatever user you created there.', 'start': 2013.829, 'duration': 2.401}, {'end': 2017.951, 'text': 'And now the IP address.', 'start': 2016.691, 'duration': 1.26}], 'summary': 'Copying the django project to queryms at the specified ip address.', 'duration': 28.425, 'max_score': 1989.526, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1989526.jpg'}], 'start': 1462.01, 'title': 'Ssh and firewall setup', 'summary': 'Explains ssh key-based authentication, disallowing root logins, and disabling password authentication, enhancing security. it also covers setting up a firewall using ufw with basic rules and deploying a django application with a virtual environment.', 'chapters': [{'end': 1606.016, 'start': 1462.01, 'title': 'Ssh configuration best practices', 'summary': 'Explains how to set up ssh key-based authentication, disallow root logins, and disable password authentication, enhancing security and convenience for users, with a demonstration of logging in without a password and restarting the ssh service.', 'duration': 144.006, 'highlights': ['Demonstrated logging in without a password using SSH keys, enhancing security', 'Explained the importance of disallowing root logins and only allowing user logins', 'Emphasized the necessity of disabling password authentication for enhanced security', 'Demonstrated the process of changing SSH configuration settings and restarting the SSH service']}, {'end': 2044.107, 'start': 1606.016, 'title': 'Setting up firewall and deploying django application', 'summary': 'Covers setting up a firewall using ufw with basic rules including allowing outgoing traffic, denying incoming traffic, and allowing specific ports while also demonstrating the process of deploying a django application with a virtual environment and creating a requirements.txt file.', 'duration': 438.091, 'highlights': ['Setting up firewall using UFW', 'Deploying Django application with virtual environment', 'Copying Django project to the server']}], 'duration': 582.097, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds1462010.jpg', 'highlights': ['Demonstrated logging in without a password using SSH keys, enhancing security', 'Explained the importance of disallowing root logins and only allowing user logins', 'Emphasized the necessity of disabling password authentication for enhanced security', 'Demonstrated the process of changing SSH configuration settings and restarting the SSH service', 'Setting up firewall using UFW', 'Deploying Django application with virtual environment', 'Copying Django project to the server']}, {'end': 2637.071, 'segs': [{'end': 2120.159, 'src': 'embed', 'start': 2044.107, 'weight': 2, 'content': [{'end': 2051.746, 'text': "so i'm going to run that Okay, and that copied everything from our Django project onto our server.", 'start': 2044.107, 'duration': 7.639}, {'end': 2060.318, 'text': 'So now let me minimize our local machine here and go back to our server that we still have open in this terminal window.', 'start': 2052.127, 'duration': 8.191}, {'end': 2065.005, 'text': 'And now let me do an ls on the home directory to make sure that that copied over.', 'start': 2060.759, 'duration': 4.246}, {'end': 2066.065, 'text': 'And we can see that it did.', 'start': 2065.145, 'duration': 0.92}, {'end': 2067.688, 'text': 'We have our Django project here.', 'start': 2066.106, 'duration': 1.582}, {'end': 2073.274, 'text': 'And if we do an LS on Django project, then we can see that it has all of our applications.', 'start': 2068.268, 'duration': 5.006}, {'end': 2079.561, 'text': "So it's got the main Django project here, the users, the blog, and our SQLite file, everything.", 'start': 2073.333, 'duration': 6.228}, {'end': 2085.562, 'text': "OK, so now that we have our Django application on our web server, now we're ready to actually get it running on here.", 'start': 2079.94, 'duration': 5.622}, {'end': 2091.264, 'text': "So first of all, let's create a virtual environment that is going to run our application.", 'start': 2086.283, 'duration': 4.981}, {'end': 2095.284, 'text': "So to do this, we're going to need to install a couple of things.", 'start': 2092.164, 'duration': 3.12}, {'end': 2100.246, 'text': "So I'm going to say sudo apt-get install.", 'start': 2095.685, 'duration': 4.561}, {'end': 2102.007, 'text': 'And we want to install.', 'start': 2100.706, 'duration': 1.301}, {'end': 2105.331, 'text': "So first I'll install Python 3-PIP.", 'start': 2102.268, 'duration': 3.063}, {'end': 2111.597, 'text': "Now you want to do the Python 3-PIP because if you don't put the 3 there, it'll do Python version 2.", 'start': 2105.751, 'duration': 5.846}, {'end': 2114.44, 'text': "So we'll do a sudo install of Python 3-PIP.", 'start': 2111.597, 'duration': 2.843}, {'end': 2120.159, 'text': 'Now, some of those installations can take a bit.', 'start': 2118.058, 'duration': 2.101}], 'summary': 'Transferring django project to server, setting up virtual environment and installing python 3-pip.', 'duration': 76.052, 'max_score': 2044.107, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2044107.jpg'}, {'end': 2218.218, 'src': 'embed', 'start': 2191.748, 'weight': 3, 'content': [{'end': 2205.531, 'text': "So I'm going to cd into our Django project directory and within here I'm going to say source venv bin activate and that should activate our virtual environment.", 'start': 2191.748, 'duration': 13.783}, {'end': 2212.553, 'text': "We can see here at the beginning of our prompt we now it now says venv so that's a good sign that our virtual environment is activated.", 'start': 2205.871, 'duration': 6.682}, {'end': 2218.218, 'text': "Okay, so now I'm going to install all of those dependencies from our requirements.txt file.", 'start': 2212.933, 'duration': 5.285}], 'summary': 'Activating virtual environment in django project directory and installing dependencies from requirements.txt.', 'duration': 26.47, 'max_score': 2191.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2191748.jpg'}, {'end': 2277.974, 'src': 'embed', 'start': 2254.12, 'weight': 4, 'content': [{'end': 2263.643, 'text': 'so you just install the version of django that you used in the series and then pillow and crispy forms and all of the other packages that we use throughout the series.', 'start': 2254.12, 'duration': 9.523}, {'end': 2267.806, 'text': 'Okay, so now that we have all of that installed, let me clear my screen here.', 'start': 2264.043, 'duration': 3.763}, {'end': 2274.151, 'text': "Now let's change some settings in Django so that we can test this on our Linode server.", 'start': 2268.667, 'duration': 5.484}, {'end': 2277.974, 'text': "So first, I'm going to open up our settings.py file.", 'start': 2274.551, 'duration': 3.423}], 'summary': 'Install specific django version, along with other packages, and configure settings for testing on linode server.', 'duration': 23.854, 'max_score': 2254.12, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2254120.jpg'}, {'end': 2416.376, 'src': 'embed', 'start': 2391.404, 'weight': 1, 'content': [{'end': 2399.968, 'text': 'So now to get our static files working here on the server, we need to run a command called collect static.', 'start': 2391.404, 'duration': 8.564}, {'end': 2406.091, 'text': "So I'm going to say python manage.py and that is collect static.", 'start': 2400.288, 'duration': 5.803}, {'end': 2416.376, 'text': 'So if we run that, then we can see that it says 120 static files copied to this static directory here within our Django project.', 'start': 2406.451, 'duration': 9.925}], 'summary': "Running 'collectstatic' command copies 120 static files to the static directory in django project.", 'duration': 24.972, 'max_score': 2391.404, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2391404.jpg'}, {'end': 2501.6, 'src': 'embed', 'start': 2474.007, 'weight': 7, 'content': [{'end': 2479.391, 'text': "So I'm going to open Chrome back up and see if we can access this.", 'start': 2474.007, 'duration': 5.384}, {'end': 2481.662, 'text': 'So my IP address was 198.58.', 'start': 2479.771, 'duration': 1.891}, {'end': 2491.136, 'text': '119.183 And to go to port 8000 we can put in a colon and then 8000.', 'start': 2481.662, 'duration': 9.474}, {'end': 2499.159, 'text': 'So if I run that then we can see that our blog is now available through our browser.', 'start': 2491.136, 'duration': 8.023}, {'end': 2501.6, 'text': 'So this should be accessible to anybody.', 'start': 2499.439, 'duration': 2.161}], 'summary': 'Accessed blog through ip address 198.58.119.183 on port 8000.', 'duration': 27.593, 'max_score': 2474.007, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2474007.jpg'}, {'end': 2601.139, 'src': 'embed', 'start': 2564.384, 'weight': 0, 'content': [{'end': 2569.046, 'text': "let's try to delete a post, and that seems to work as well.", 'start': 2564.384, 'duration': 4.662}, {'end': 2571.927, 'text': "let's try to update our profile picture.", 'start': 2569.046, 'duration': 2.881}, {'end': 2578.489, 'text': 'you want to be sure that you test a good bit of functionality just to make sure that it all seems to be working properly.', 'start': 2571.927, 'duration': 6.562}, {'end': 2582.491, 'text': "so let's update a profile picture And that seems to work as well.", 'start': 2578.489, 'duration': 4.002}, {'end': 2584.832, 'text': "Let's test the logout.", 'start': 2583.231, 'duration': 1.601}, {'end': 2587.153, 'text': 'Okay, and the logout works.', 'start': 2585.912, 'duration': 1.241}, {'end': 2589.694, 'text': "And lastly, let's test the admin page.", 'start': 2587.553, 'duration': 2.141}, {'end': 2601.139, 'text': "So I'm going to go to forward slash admin and then put in the user I created with admin access is Corey MS. And I will log in here.", 'start': 2589.974, 'duration': 11.165}], 'summary': 'Successfully tested deleting a post, updating profile picture, logging out, and accessing admin page.', 'duration': 36.755, 'max_score': 2564.384, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2564384.jpg'}], 'start': 2044.107, 'title': 'Deploying and configuring django project on web server', 'summary': 'Covers deploying a django project onto a web server, creating a virtual environment, setting up python 3-pip, configuring static files, and testing server functionality, including creating users and posts.', 'chapters': [{'end': 2091.264, 'start': 2044.107, 'title': 'Deploying django project on web server', 'summary': 'Details the process of deploying a django project onto a web server, including copying the project files, verifying the transfer, and creating a virtual environment for running the application.', 'duration': 47.157, 'highlights': ["The process involves copying the Django project onto the web server and verifying the transfer by checking the directory contents with 'ls'.", 'The transcript emphasizes the creation of a virtual environment to run the Django application on the web server.']}, {'end': 2329.525, 'start': 2092.164, 'title': 'Setting up python virtual environment in django', 'summary': "Covers the installation of python 3-pip and creating a virtual environment in a django project, including the installation of dependencies from the requirements.txt file and changing settings in django's settings.py file to allow traffic on a linode server.", 'duration': 237.361, 'highlights': ["Installing Python 3-PIP and Python 3's virtual environment", 'Activating and installing dependencies in the virtual environment', "Changing settings in Django's settings.py file"]}, {'end': 2637.071, 'start': 2330.346, 'title': 'Configuring static files and testing server functionality', 'summary': "Discusses configuring static files for production, running the 'collect static' command, and testing server functionality including creating users, posts, and testing admin access.", 'duration': 306.725, 'highlights': ["The 'collect static' command copied 120 static files to the static directory within the Django project.", 'The server successfully allows access to the blog from the outside using the IP address and port 8000.', 'Testing server functionality includes creating a new user, logging in, creating a post, updating and deleting a post, updating a profile picture, logging out, and accessing the admin page, all of which seem to work properly.']}], 'duration': 592.964, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2044107.jpg', 'highlights': ['Testing server functionality includes creating a new user, logging in, creating a post, updating and deleting a post, updating a profile picture, logging out, and accessing the admin page, all of which seem to work properly.', "The 'collect static' command copied 120 static files to the static directory within the Django project.", "Installing Python 3-PIP and Python 3's virtual environment", 'Activating and installing dependencies in the virtual environment', "Changing settings in Django's settings.py file", "The process involves copying the Django project onto the web server and verifying the transfer by checking the directory contents with 'ls'.", 'The transcript emphasizes the creation of a virtual environment to run the Django application on the web server.', 'The server successfully allows access to the blog from the outside using the IP address and port 8000.']}, {'end': 2996.779, 'segs': [{'end': 2708.586, 'src': 'embed', 'start': 2684.197, 'weight': 0, 'content': [{'end': 2690.658, 'text': "First, we need to install Apache, which is going to be our web server, and then we're going to install something called a ModWSGI.", 'start': 2684.197, 'duration': 6.461}, {'end': 2697.539, 'text': 'Now, WSGI, which is W-S-G-I, stands for Web Service Gateway Interface.', 'start': 2690.978, 'duration': 6.561}, {'end': 2701.522, 'text': "And that's what allows our web server, in this case, Apache.", 'start': 2697.919, 'duration': 3.603}, {'end': 2708.586, 'text': 'it allows our web server to talk to Python and to talk to our web application, which in this case is Django.', 'start': 2701.522, 'duration': 7.064}], 'summary': 'Install apache as web server and modwsgi to enable communication with python and django.', 'duration': 24.389, 'max_score': 2684.197, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2684197.jpg'}, {'end': 2872.732, 'src': 'embed', 'start': 2821.811, 'weight': 2, 'content': [{'end': 2825.594, 'text': 'but I have to make a trade-off between having the text large enough to where you can read it,', 'start': 2821.811, 'duration': 3.783}, {'end': 2830.577, 'text': 'but sometimes that makes it harder to read when it goes onto multiple lines like that.', 'start': 2825.594, 'duration': 4.983}, {'end': 2835.761, 'text': "Okay, so now we've created this DjangoProject.conf configuration file.", 'start': 2830.957, 'duration': 4.804}, {'end': 2838.722, 'text': 'that is a copy of the default configuration file.', 'start': 2836.161, 'duration': 2.561}, {'end': 2844.863, 'text': "So now let's edit it to where it meets the needs for our project.", 'start': 2839.242, 'duration': 5.621}, {'end': 2851.065, 'text': "So I'm going to do sudo nano and change that django-project.conf file.", 'start': 2845.123, 'duration': 5.942}, {'end': 2855.886, 'text': 'Okay, so what we have here is a default configuration file for Apache.', 'start': 2851.385, 'duration': 4.501}, {'end': 2862.548, 'text': 'Now where it says virtual host 80 right here, this 80, it means port 80.', 'start': 2856.767, 'duration': 5.781}, {'end': 2865.249, 'text': "So this is what's going to show up on HTTP port.", 'start': 2862.548, 'duration': 2.701}, {'end': 2872.732, 'text': "So whenever we go to our IP address in the browser, it's going to follow these rules.", 'start': 2865.969, 'duration': 6.763}], 'summary': 'Adjusting configuration file for djangoproject to fit project needs and port 80 for http access.', 'duration': 50.921, 'max_score': 2821.811, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2821811.jpg'}, {'end': 2921.738, 'src': 'embed', 'start': 2894.059, 'weight': 3, 'content': [{'end': 2898.342, 'text': 'And remember, in our project settings, we put this in our projects base directory.', 'start': 2894.059, 'duration': 4.283}, {'end': 2900.784, 'text': "So to do this, I'm going to say alias.", 'start': 2898.742, 'duration': 2.042}, {'end': 2905.327, 'text': 'And we want to alias anything that references static.', 'start': 2901.404, 'duration': 3.923}, {'end': 2910.35, 'text': 'And we want that to go to our projects static directory.', 'start': 2905.807, 'duration': 4.543}, {'end': 2914.653, 'text': 'Now on my machine, this is located in my home directory.', 'start': 2910.67, 'duration': 3.983}, {'end': 2918.375, 'text': "And my user is Corey MS. You're going to want to put your user there.", 'start': 2914.973, 'duration': 3.402}, {'end': 2921.738, 'text': 'My project is called Django underscore project.', 'start': 2918.856, 'duration': 2.882}], 'summary': "Set project settings to alias 'static' to projects static directory in base directory", 'duration': 27.679, 'max_score': 2894.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2894059.jpg'}], 'start': 2637.371, 'title': 'Setting up apache web server for django', 'summary': 'Covers installing and configuring apache web server and modwsgi for communication with django, emphasizing the importance of wsgi. it also explains configuring apache for a django project, including setting up aliases and permissions for static and media folders.', 'chapters': [{'end': 2766.737, 'start': 2637.371, 'title': 'Setting up apache web server for django', 'summary': 'Covers the process of installing and configuring apache web server and modwsgi to enable communication between the web server and django, including the installation of apache and modwsgi and the importance of the web service gateway interface (wsgi).', 'duration': 129.366, 'highlights': ['The installation and configuration of Apache web server and ModWSGI are essential for enabling communication between the web server and Django, which is achieved by installing Apache and ModWSGI and understanding the role of WSGI (Web Service Gateway Interface).', "The process involves the installation of Apache by using the command 'sudo apt-get install Apache2' and then clearing the screen, followed by installing ModWSGI using the command 'sudo apt-get install libapache2-mod-wsgi-py3', and finally, configuring the Apache web server.", 'Understanding the significance of WSGI (Web Service Gateway Interface) in allowing the web server to communicate with Python and the web application, which in this case is Django, is crucial for the successful setup of the web server.']}, {'end': 2996.779, 'start': 2766.737, 'title': 'Configuring apache for django project', 'summary': 'Explains the process of configuring apache for a django project, including copying the default configuration file, editing it to meet project needs, and setting up aliases and permissions for static and media folders.', 'duration': 230.042, 'highlights': ["The process involves copying the default configuration file and editing it to meet the project's needs.", 'Setting up aliases and permissions for static and media folders.', "Explaining the significance of 'virtual host 80' and its association with port 80 for HTTP requests."]}], 'duration': 359.408, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2637371.jpg', 'highlights': ['The installation and configuration of Apache web server and ModWSGI are essential for enabling communication between the web server and Django, which is achieved by installing Apache and ModWSGI and understanding the role of WSGI (Web Service Gateway Interface).', 'Understanding the significance of WSGI (Web Service Gateway Interface) in allowing the web server to communicate with Python and the web application, which in this case is Django, is crucial for the successful setup of the web server.', "The process involves copying the default configuration file and editing it to meet the project's needs.", 'Setting up aliases and permissions for static and media folders.', "Explaining the significance of 'virtual host 80' and its association with port 80 for HTTP requests.", "The process involves the installation of Apache by using the command 'sudo apt-get install Apache2' and then clearing the screen, followed by installing ModWSGI using the command 'sudo apt-get install libapache2-mod-wsgi-py3', and finally, configuring the Apache web server."]}, {'end': 3928.585, 'segs': [{'end': 3077.48, 'src': 'embed', 'start': 3043.005, 'weight': 3, 'content': [{'end': 3049.987, 'text': "So now within there, and I'm just going to go ahead and close this off right now so I don't forget later.", 'start': 3043.005, 'duration': 6.982}, {'end': 3054.068, 'text': 'So within here we want to create some file tags.', 'start': 3050.407, 'duration': 3.661}, {'end': 3064.93, 'text': "So I will say files and that is wsgi.py and I'll also close off that files tag there as well.", 'start': 3054.408, 'duration': 10.522}, {'end': 3072.418, 'text': 'And within here, we also want to say require all granted.', 'start': 3066.835, 'duration': 5.583}, {'end': 3074.399, 'text': "Okay, so we're just about finished up here.", 'start': 3072.858, 'duration': 1.541}, {'end': 3077.48, 'text': 'Just a couple of more things to add.', 'start': 3074.479, 'duration': 3.001}], 'summary': "Creating file tags for wsgi.py and adding 'require all granted' to configuration.", 'duration': 34.475, 'max_score': 3043.005, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3043005.jpg'}, {'end': 3249.789, 'src': 'heatmap', 'start': 3131.858, 'weight': 4, 'content': [{'end': 3137.76, 'text': 'So basically, that means going to the base of our IP address without any extra routes will take us to our Django application.', 'start': 3131.858, 'duration': 5.902}, {'end': 3143.483, 'text': 'And the second part here is the full path to that wsgi.py file.', 'start': 3138.38, 'duration': 5.103}, {'end': 3148.506, 'text': 'So once we have that done, now we can specify the daemon process.', 'start': 3143.884, 'duration': 4.622}, {'end': 3155.891, 'text': "So I'll say wsgi daemon is how you spell that daemon process.", 'start': 3148.807, 'duration': 7.084}, {'end': 3160.294, 'text': 'And now we can just call this whatever we want.', 'start': 3156.611, 'duration': 3.683}, {'end': 3162.435, 'text': "It's just going to be the process.", 'start': 3160.434, 'duration': 2.001}, {'end': 3163.756, 'text': "So we'll just call it Django app.", 'start': 3162.455, 'duration': 1.301}, {'end': 3169.257, 'text': "And now I can say Python path, and I don't want any spaces there.", 'start': 3164.376, 'duration': 4.881}, {'end': 3173.879, 'text': 'So Python path equal to, this is going to be the path to our project directory.', 'start': 3169.558, 'duration': 4.321}, {'end': 3181.281, 'text': "So on my machine, that's forward slash home, forward slash query MS, forward slash Django project.", 'start': 3174.259, 'duration': 7.022}, {'end': 3184.902, 'text': 'Again, you put in the path to your Django project there.', 'start': 3181.641, 'duration': 3.261}, {'end': 3194.93, 'text': "um, and now we also need to specify python dash home and for python home i'm going to say that equals,", 'start': 3185.542, 'duration': 9.388}, {'end': 3198.633, 'text': 'and this is going to be the location to our virtual environment.', 'start': 3194.93, 'duration': 3.703}, {'end': 3200.474, 'text': "so i'm in on my machine.", 'start': 3198.633, 'duration': 1.841}, {'end': 3202.116, 'text': 'that is forward slash home.', 'start': 3200.474, 'duration': 1.642}, {'end': 3203.997, 'text': 'forward slash corey ms.', 'start': 3202.116, 'duration': 1.881}, {'end': 3209.201, 'text': 'forward slash django underscore project forward slash v e n v.', 'start': 3203.997, 'duration': 5.204}, {'end': 3216.225, 'text': 'Now I know that this is a lot of typing and it might be easy to mess something up here or mistype something.', 'start': 3210.282, 'duration': 5.943}, {'end': 3227.152, 'text': "so I'm going to take this configuration file once we're done with this video and I'll put this in my GitHub page so that you can compare it to yours to see if you've made any mistakes.", 'start': 3216.225, 'duration': 10.927}, {'end': 3232.515, 'text': 'Okay, so with that said, we only have one more line here to finish up this configuration.', 'start': 3228.052, 'duration': 4.463}, {'end': 3237.539, 'text': 'So this is going to be WSGI process group.', 'start': 3232.995, 'duration': 4.544}, {'end': 3245.845, 'text': 'And we want this process group to be equal to this process here that we specified in this daemon process.', 'start': 3238.48, 'duration': 7.365}, {'end': 3249.789, 'text': "So I'm just going to type in the same thing there.", 'start': 3246.186, 'duration': 3.603}], 'summary': 'Configuring django application with wsgi daemon and process group.', 'duration': 28.436, 'max_score': 3131.858, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3131858.jpg'}, {'end': 3320.586, 'src': 'embed', 'start': 3293.55, 'weight': 2, 'content': [{'end': 3300.631, 'text': 'And then we want to specify that Django project, and I will hit enter there.', 'start': 3293.55, 'duration': 7.081}, {'end': 3305.372, 'text': "And you can see that it's telling us that to activate the new configuration, we need to restart Apache.", 'start': 3301.011, 'duration': 4.361}, {'end': 3307.052, 'text': "We'll do that in just a minute.", 'start': 3305.812, 'duration': 1.24}, {'end': 3310.636, 'text': "Now I'm also going to disable the default site.", 'start': 3307.993, 'duration': 2.643}, {'end': 3317.903, 'text': "So I'm going to say sudo a2 for Apache 2, dis for disable, and then site.", 'start': 3310.956, 'duration': 6.947}, {'end': 3320.586, 'text': 'And we will disable that 000default.conf.', 'start': 3318.284, 'duration': 2.302}], 'summary': 'Configuring django project, restarting apache, and disabling default site.', 'duration': 27.036, 'max_score': 3293.55, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3293550.jpg'}, {'end': 3514.771, 'src': 'embed', 'start': 3485.226, 'weight': 0, 'content': [{'end': 3489.087, 'text': 'And we want to give permissions here on the media folder.', 'start': 3485.226, 'duration': 3.861}, {'end': 3492.507, 'text': "So I'll say for Django project forward slash media.", 'start': 3489.447, 'duration': 3.06}, {'end': 3499.688, 'text': "So I'll run that and that will allow Apache to actually write uploaded media to that media folder.", 'start': 3492.887, 'duration': 6.801}, {'end': 3502.249, 'text': "And now let's change the permissions here.", 'start': 3500.229, 'duration': 2.02}, {'end': 3514.771, 'text': "So I'm going to do a sudo chmod dash R and we will do a 775 and we will do Django project media again and run that.", 'start': 3502.429, 'duration': 12.342}], 'summary': 'Setting permissions for media folder to 775 for django project', 'duration': 29.545, 'max_score': 3485.226, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3485226.jpg'}, {'end': 3581.893, 'src': 'embed', 'start': 3554.257, 'weight': 1, 'content': [{'end': 3560.599, 'text': 'I think it would be a lot easier to just do a config file for this sensitive information instead of doing environment variables.', 'start': 3554.257, 'duration': 6.342}, {'end': 3572.867, 'text': "So the sensitive information that I'm talking about is going to be like our secret key for our application and our email username and our email password that we use to reset our password in the application.", 'start': 3561.079, 'duration': 11.788}, {'end': 3573.967, 'text': 'And in the future.', 'start': 3573.267, 'duration': 0.7}, {'end': 3581.893, 'text': 'this is also where we are going to add our database username and database password and things like that when we use postgres.', 'start': 3573.967, 'duration': 7.926}], 'summary': 'Suggests using a config file for sensitive information, including secret key, email credentials, and future database info.', 'duration': 27.636, 'max_score': 3554.257, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3554257.jpg'}], 'start': 2997.339, 'title': 'Deploying django project', 'summary': 'Explains granting access to the wsgi.py file, setting up file permissions, and final deployment of a django application, including moving sensitive information to a config file and updating settings.py file, with an emphasis on setting debug to false in the production environment.', 'chapters': [{'end': 3209.201, 'start': 2997.339, 'title': 'Granting access to wsgi.py file', 'summary': 'Explains the process of granting access to the wsgi.py file within the django project, including creating file tags, specifying daemon mode, and defining python path and python home.', 'duration': 211.862, 'highlights': ['The chapter explains the process of granting access to the wsgi.py file within the Django project.', 'Creating file tags and specifying require all granted.', 'Specifying daemon mode and defining wsgi daemon and Python path.']}, {'end': 3514.771, 'start': 3210.282, 'title': 'Setting up django project permissions', 'summary': "Covers setting up file permissions for the django project, including granting apache access to the database and media folder, ensuring apache is the group owner and changing permissions with 'chown' and 'chmod'.", 'duration': 304.489, 'highlights': ["Grant Apache access to database and media folder by changing ownership and permissions with 'chown' and 'chmod', ensuring Apache is the group owner of the files and giving appropriate read and write permissions.", "Use 'chown' and 'chmod' commands to change ownership and permissions for the database file and media folder, allowing Apache to read and write to the SQLite database and upload media to the media folder.", "Enable the Django project site through Apache using 'sudo A2EN site' and disable the default site with 'sudo A2DIS site'.", 'Provide a configuration file on GitHub for comparison to identify mistakes, and finish the configuration by specifying the WSGI process group equal to the specified daemon process.']}, {'end': 3928.585, 'start': 3515.111, 'title': 'Final deployment with django config file', 'summary': 'Covers the final deployment of a django application, including moving sensitive information to a config file, such as the secret key, email username, and password, and updating the settings.py file to load and use the config file, while emphasizing the importance of setting debug to false in the production environment.', 'duration': 413.474, 'highlights': ['Moving sensitive information to a config file, including the secret key, email username, and password', 'Creating and updating the config.json file to store the sensitive information', 'Importing and using the config file in the settings.py file']}], 'duration': 931.246, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds2997339.jpg', 'highlights': ["Grant Apache access to database and media folder by changing ownership and permissions with 'chown' and 'chmod', ensuring Apache is the group owner of the files and giving appropriate read and write permissions.", 'Moving sensitive information to a config file, including the secret key, email username, and password', "Enable the Django project site through Apache using 'sudo A2EN site' and disable the default site with 'sudo A2DIS site'", 'Creating file tags and specifying require all granted.', 'Specifying daemon mode and defining wsgi daemon and Python path.']}, {'end': 4907.672, 'segs': [{'end': 3961.53, 'src': 'embed', 'start': 3929.065, 'weight': 2, 'content': [{'end': 3930.706, 'text': 'Okay, and we are almost done.', 'start': 3929.065, 'duration': 1.641}, {'end': 3937.932, 'text': 'Let me scroll down to the very bottom here where I set my email username and email password information.', 'start': 3930.927, 'duration': 7.005}, {'end': 3940.894, 'text': "So that's at the very bottom of the settings.py file.", 'start': 3938.092, 'duration': 2.802}, {'end': 3945.358, 'text': 'And you can see here, we were using environment variables.', 'start': 3941.475, 'duration': 3.883}, {'end': 3949.221, 'text': "That's what we used earlier in the series whenever we added this functionality.", 'start': 3945.718, 'duration': 3.503}, {'end': 3951.963, 'text': "But now I'm using that config file instead.", 'start': 3949.581, 'duration': 2.382}, {'end': 3957.207, 'text': "So instead of os.environ.get, I'm just going to say config.get.", 'start': 3952.403, 'duration': 4.804}, {'end': 3961.53, 'text': 'And we will keep that as email user.', 'start': 3958.688, 'duration': 2.842}], 'summary': 'Transitioning from environment variables to config file for email user and password.', 'duration': 32.465, 'max_score': 3929.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3929065.jpg'}, {'end': 4095.771, 'src': 'heatmap', 'start': 4007.367, 'weight': 1, 'content': [{'end': 4012.828, 'text': 'I went back into my configuration file and I put in my information for my email, username, and password.', 'start': 4007.367, 'duration': 5.461}, {'end': 4015.588, 'text': "You'll have to go in and do your information there.", 'start': 4013.288, 'duration': 2.3}, {'end': 4017.769, 'text': 'But now that should be it.', 'start': 4016.129, 'duration': 1.64}, {'end': 4019.929, 'text': 'We should be ready to go.', 'start': 4018.069, 'duration': 1.86}, {'end': 4022.09, 'text': 'It should be fully deployed at this point.', 'start': 4020.029, 'duration': 2.061}, {'end': 4026.812, 'text': 'Now, all we need to do, is a couple more commands here.', 'start': 4023.03, 'duration': 3.782}, {'end': 4035.92, 'text': 'So we want to disallow the port 8000 that we were using to test earlier with our firewall.', 'start': 4027.152, 'duration': 8.768}, {'end': 4041.805, 'text': "So what I'm going to do is a sudo ufw delete that allow.", 'start': 4036.241, 'duration': 5.564}, {'end': 4045.787, 'text': 'so delete allow on port 8000.', 'start': 4041.805, 'duration': 3.982}, {'end': 4051.57, 'text': 'and so we can see that the rule was deleted and now we want to allow HTTP traffic.', 'start': 4045.787, 'duration': 5.783}, {'end': 4059.413, 'text': "so I'm going to say sudo ufw allow HTTP forward, slash TCP.", 'start': 4051.57, 'duration': 7.843}, {'end': 4061.314, 'text': "so I'll run that okay.", 'start': 4059.413, 'duration': 1.901}, {'end': 4066.917, 'text': 'and with that done, now we can restart our Apache server and it should be good to go.', 'start': 4061.314, 'duration': 5.603}, {'end': 4073.899, 'text': 'so I will say sudo service Apache Apache 2, restart.', 'start': 4066.917, 'duration': 6.982}, {'end': 4076.841, 'text': "so let's restart that and I'll clear my screen.", 'start': 4073.899, 'duration': 2.942}, {'end': 4082.683, 'text': 'okay. so at this point, if we did everything correctly, then our site should now be live.', 'start': 4076.841, 'duration': 5.842}, {'end': 4095.771, 'text': "so if we pull back up our browser and here before we were at port 8000, if I try to reload that page at port 8000 now it shouldn't give me anything.", 'start': 4082.683, 'duration': 13.088}], 'summary': 'Configured email, username, and password. deployed fully. modified firewall settings. restarted apache server. site should now be live.', 'duration': 53.947, 'max_score': 4007.367, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4007367.jpg'}, {'end': 4206.039, 'src': 'embed', 'start': 4180.443, 'weight': 6, 'content': [{'end': 4186.587, 'text': 'because it can give a lot of information about your backend server and leave you more vulnerable to future attacks.', 'start': 4180.443, 'duration': 6.144}, {'end': 4191.151, 'text': 'But if we have an error like this, then how do we go about debugging this??', 'start': 4186.908, 'duration': 4.243}, {'end': 4196.314, 'text': "Well, if you're on a live server and working on a live website,", 'start': 4191.951, 'duration': 4.363}, {'end': 4203.998, 'text': 'then I would recommend setting up a test server and testing everything there where you can set debug equal to true.', 'start': 4196.694, 'duration': 7.304}, {'end': 4206.039, 'text': "that's not open to the public.", 'start': 4203.998, 'duration': 2.041}], 'summary': 'Debug errors on a live server by setting up a test server to test with debug equal to true.', 'duration': 25.596, 'max_score': 4180.443, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4180443.jpg'}, {'end': 4326.872, 'src': 'embed', 'start': 4297.567, 'weight': 5, 'content': [{'end': 4302.751, 'text': 'So we can see here that it says attempt to write read only database.', 'start': 4297.567, 'duration': 5.184}, {'end': 4310.317, 'text': 'So that leads me to believe that it is a permissions error with our database.', 'start': 4304.132, 'duration': 6.185}, {'end': 4315.161, 'text': 'So if we go back to our server, then let me clear this out.', 'start': 4310.677, 'duration': 4.484}, {'end': 4319.344, 'text': 'If I do an ls dash la, then we can see the permissions here.', 'start': 4315.621, 'duration': 3.723}, {'end': 4322.687, 'text': "So I'm going to do that on our project.", 'start': 4319.964, 'duration': 2.723}, {'end': 4326.872, 'text': 'So our db.sqlite, this is our database file.', 'start': 4323.288, 'duration': 3.584}], 'summary': 'Permission error on database file db.sqlite.', 'duration': 29.305, 'max_score': 4297.567, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4297567.jpg'}, {'end': 4418.601, 'src': 'embed', 'start': 4387.059, 'weight': 4, 'content': [{'end': 4393.601, 'text': "So hopefully this will work and we don't have to make any more changes.", 'start': 4387.059, 'duration': 6.542}, {'end': 4399.783, 'text': 'So deployed user, deployed user at test.com, fill out.', 'start': 4393.961, 'duration': 5.822}, {'end': 4402.968, 'text': 'password there and sign up.', 'start': 4401.587, 'duration': 1.381}, {'end': 4404.71, 'text': 'Okay, and it looks like that worked.', 'start': 4403.549, 'duration': 1.161}, {'end': 4408.933, 'text': "Okay, so now let's also test all of the other functionality as well.", 'start': 4405.03, 'duration': 3.903}, {'end': 4413.977, 'text': "So let's log in with that deployed user that we just created.", 'start': 4409.293, 'duration': 4.684}, {'end': 4415.679, 'text': 'Okay, so we can log in.', 'start': 4414.598, 'duration': 1.081}, {'end': 4416.479, 'text': "So that's good.", 'start': 4415.819, 'duration': 0.66}, {'end': 4418.601, 'text': 'We can go to our profile.', 'start': 4416.92, 'duration': 1.681}], 'summary': 'Successfully deployed user at test.com, filled out password, signed up, logged in, and accessed profile.', 'duration': 31.542, 'max_score': 4387.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4387059.jpg'}, {'end': 4588.057, 'src': 'embed', 'start': 4563.175, 'weight': 0, 'content': [{'end': 4568.32, 'text': 'They have a deployment checklist on their website here of things that you can go down through and check.', 'start': 4563.175, 'duration': 5.145}, {'end': 4574.365, 'text': 'So if we just kind of scroll through here, then we can see a couple of things.', 'start': 4568.94, 'duration': 5.425}, {'end': 4576.887, 'text': 'So, like critical settings, secret key.', 'start': 4574.425, 'duration': 2.462}, {'end': 4583.053, 'text': "the secret key should be either an environment variable or from a file, and we put it in a file, so that's good.", 'start': 4576.887, 'duration': 6.166}, {'end': 4588.057, 'text': 'You should never enable debug in production.', 'start': 4584.054, 'duration': 4.003}], 'summary': 'Deployment checklist includes critical settings, secret key handling, and debug restriction for production.', 'duration': 24.882, 'max_score': 4563.175, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4563175.jpg'}, {'end': 4680.024, 'src': 'embed', 'start': 4648.509, 'weight': 3, 'content': [{'end': 4652.211, 'text': "Now there's still a lot more that we could do with this in the future if you're interested.", 'start': 4648.509, 'duration': 3.702}, {'end': 4655.833, 'text': 'So right now we only have an IP address, But if you want,', 'start': 4652.771, 'duration': 3.062}, {'end': 4663.356, 'text': "then I can also walk through the process of buying a domain name and how to get the domain name to go to this server that we've set up.", 'start': 4655.833, 'duration': 7.523}, {'end': 4669.82, 'text': 'We could also see how to add SSL certificates so that we can have an HTTPS domain.', 'start': 4663.977, 'duration': 5.843}, {'end': 4673.782, 'text': "That's actually something that I still need to do for my personal website as well.", 'start': 4670.26, 'duration': 3.522}, {'end': 4680.024, 'text': "Now after I record this video, I'm going to delete the Linode server.", 'start': 4674.982, 'duration': 5.042}], 'summary': 'Options for future setup include buying a domain, adding ssl certificates, and deleting the linode server.', 'duration': 31.515, 'max_score': 4648.509, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4648509.jpg'}, {'end': 4760.092, 'src': 'embed', 'start': 4734.404, 'weight': 8, 'content': [{'end': 4741.566, 'text': 'and if we click on delete now it gives you a warning here that deleting a Linode server will result in permanent data loss.', 'start': 4734.404, 'duration': 7.162}, {'end': 4744.947, 'text': 'so everything that we did to our server is going to be lost.', 'start': 4741.566, 'duration': 3.381}, {'end': 4751.488, 'text': "so I will click delete and then it'll ask us if we're sure, click delete and that server is gone.", 'start': 4744.947, 'duration': 6.541}, {'end': 4754.629, 'text': "so it's no longer charging us money for that Linode server.", 'start': 4751.488, 'duration': 3.141}, {'end': 4760.092, 'text': 'Now, like I said at the beginning of this video, Linode was actually kind enough to sponsor this tutorial.', 'start': 4755.009, 'duration': 5.083}], 'summary': 'Deleting a linode server results in permanent data loss; sponsored by linode.', 'duration': 25.688, 'max_score': 4734.404, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds4734404.jpg'}], 'start': 3929.065, 'title': 'Deploying django application to linux server', 'summary': 'Covers updating the settings.py file, adding email credentials to configuration.json, configuring firewall, debugging website, resolving permissions issues, deploying django application to a linux server, buying a domain name, adding ssl certificates, and deleting a linode server.', 'chapters': [{'end': 4026.812, 'start': 3929.065, 'title': 'Updating email configuration', 'summary': 'Covers updating the settings.py file to use a config file instead of environment variables for email username and password, and then adding the email credentials to the configuration.json file, ensuring the deployment readiness.', 'duration': 97.747, 'highlights': ['The chapter covers updating the settings.py file to use a config file instead of environment variables for email username and password.', 'The instructor adds the email credentials to the configuration.json file to ensure the deployment readiness.', 'The instructor saves the settings.py file and proceeds with the necessary steps for deployment.']}, {'end': 4536.153, 'start': 4027.152, 'title': 'Configuring firewall and debugging website', 'summary': "Details the process of disallowing a port, allowing http traffic, restarting the apache server, encountering and debugging an error, and testing the website's functionality, ultimately resolving a permissions issue and successfully testing all website features.", 'duration': 509.001, 'highlights': ['Successfully testing all website features', 'Resolving a permissions issue with the database', 'Debugging an error related to server settings', 'Disallowing a port and allowing HTTP traffic']}, {'end': 4907.672, 'start': 4537.214, 'title': 'Deploying django application to linux server', 'summary': 'Explains how to deploy a django application to a linux server, emphasizing the deployment checklist, the process of buying a domain name, and adding ssl certificates, and also highlights the process of deleting a linode server.', 'duration': 370.458, 'highlights': ['The chapter emphasizes the importance of using a deployment checklist for deploying a Django application to production, including critical settings such as secret key and debugging, to ensure proper deployment.', 'The possibility of buying a domain name and adding SSL certificates to the deployed server is mentioned, providing potential future improvements for the deployed Django application.', 'The process of deleting a Linode server is demonstrated, providing a clear guide on how to delete the server to avoid being charged, and also includes a positive endorsement of Linode as a sponsor.']}], 'duration': 978.607, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Sa_kQheCnds/pics/Sa_kQheCnds3929065.jpg', 'highlights': ['The chapter emphasizes the importance of using a deployment checklist for deploying a Django application to production, including critical settings such as secret key and debugging, to ensure proper deployment.', 'The instructor adds the email credentials to the configuration.json file to ensure the deployment readiness.', 'The chapter covers updating the settings.py file to use a config file instead of environment variables for email username and password.', 'The possibility of buying a domain name and adding SSL certificates to the deployed server is mentioned, providing potential future improvements for the deployed Django application.', 'Successfully testing all website features', 'Resolving a permissions issue with the database', 'Debugging an error related to server settings', 'Disallowed a port and allowed HTTP traffic', 'The process of deleting a Linode server is demonstrated, providing a clear guide on how to delete the server to avoid being charged, and also includes a positive endorsement of Linode as a sponsor.']}], 'highlights': ['Linode offers $20 free credit towards an account for following along with the deployment process', 'Deploying to a Linux server offers flexibility and control over the application and web server', 'The tutorial series covers comprehensive deployment options including Linux server, Heroku, and Python anywhere', 'Emphasizing best practices for deploying real-world applications', 'The installation and configuration of Apache web server and ModWSGI are essential for enabling communication between the web server and Django', 'Testing server functionality includes creating a new user, logging in, creating a post, updating and deleting a post, updating a profile picture, logging out, and accessing the admin page, all of which seem to work properly']}