title
Build & Deploy A Python Web App | Flask, Postgres & Heroku

description
In this project we will build a feedback form with Python Flask, Postgresql and mailtrap.io. We will also deploy it to Heroku Code: https://github.com/bradtraversy/python_feedback_app Deployment Gist: https://gist.github.com/bradtraversy/0029d655269c8a972df726ed0ac56b88 Sponsor: DevMountain Bootcamp https://goo.gl/6q0dEa 💖 Become a Patron: Show support & get perks! http://www.patreon.com/traversymedia Udemy Courses: https://www.traversymedia.com Follow Traversy Media: https://www.facebook.com/traversymedia https://www.twitter.com/traversymedia https://www.instagram.com/traversymedia

detail
{'title': 'Build & Deploy A Python Web App | Flask, Postgres & Heroku', 'heatmap': [{'end': 2213.982, 'start': 2172.533, 'weight': 1}], 'summary': 'Learn to deploy a python web app to heroku with postgres database and mailtrap.io for email services, while creating a feedback application for a dealership and gaining practical insights for web developers. the course also explains building a web app using python and flask, connecting to a database, submitting form data, sending emails through mailtrap, deploying to heroku, and emphasizes the simplicity of the process and unnecessary use of front end frameworks for simple applications.', 'chapters': [{'end': 152.368, 'segs': [{'end': 46.832, 'src': 'embed', 'start': 7.059, 'weight': 0, 'content': [{'end': 8.921, 'text': 'this video is sponsored by devmountain.', 'start': 7.059, 'duration': 1.862}, {'end': 12.986, 'text': "if you're interested in learning web development, ios or ux design,", 'start': 8.921, 'duration': 4.065}, {'end': 18.973, 'text': 'devmountain is a 12-week design and development boot camp intended to get you a full-time position in the industry.', 'start': 12.986, 'duration': 5.987}, {'end': 22.578, 'text': 'to learn more, visit devmountain.com or click the link in the description below.', 'start': 18.973, 'duration': 3.605}, {'end': 23.979, 'text': "hey, what's going on, guys?", 'start': 23.078, 'duration': 0.901}, {'end': 26.34, 'text': "so in this video we're gonna build a Python web app.", 'start': 23.979, 'duration': 2.361}, {'end': 33.164, 'text': "we're actually gonna deploy it as well to Heroku, and it's a feedback application for Alexis dealership.", 'start': 26.34, 'duration': 6.824}, {'end': 35.865, 'text': 'of course, you can use whatever you want you could.', 'start': 33.164, 'duration': 2.701}, {'end': 37.807, 'text': 'it could be a completely different form.', 'start': 35.865, 'duration': 1.942}, {'end': 41.008, 'text': "basically, it's gonna show you how to have a form that goes to a database.", 'start': 37.807, 'duration': 3.201}, {'end': 46.832, 'text': "also, it's gonna send an email and we're going to use mail trap dot IO,", 'start': 41.008, 'duration': 5.824}], 'summary': 'Devmountain offers 12-week boot camp for web development, ios, and ux design, aiming to secure a full-time position in the industry. python web app deployed to heroku for alexis dealership feedback.', 'duration': 39.773, 'max_score': 7.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM7059.jpg'}], 'start': 7.059, 'title': 'Deploying a python web app', 'summary': 'Covers deploying a python web app to heroku, using postgres for the database and mailtrap.io for email services, with a focus on building a feedback application for a dealership, providing practical insights for web developers.', 'chapters': [{'end': 152.368, 'start': 7.059, 'title': 'Python web app deployment tutorial', 'summary': 'Covers the deployment of a python web app to heroku, including the use of postgres for the database and mailtrap.io for email services, aiming to facilitate learning and provide practical insights for web developers, with a focus on building a feedback application for a dealership.', 'duration': 145.309, 'highlights': ['The video is sponsored by devmountain, a 12-week design and development boot camp aiming to get individuals into full-time positions in the industry, providing a link to their website for more information. Sponsorship by devmountain, 12-week design and development boot camp, full-time position in the industry', 'The tutorial demonstrates the deployment of a Python web app to Heroku, incorporating the use of Postgres for the database and mailtrap.io for email services. Deployment of Python web app to Heroku, utilization of Postgres for the database, integration of mailtrap.io for email services', 'The feedback application created is intended for a dealership, showcasing the process of building a form that interacts with a database and sends emails upon submission. Creation of a feedback application for a dealership, form interacting with a database, email sending functionality']}], 'duration': 145.309, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM7059.jpg', 'highlights': ['Deployment of Python web app to Heroku, utilization of Postgres for the database, integration of mailtrap.io for email services', 'Creation of a feedback application for a dealership, form interacting with a database, email sending functionality', 'Sponsorship by devmountain, 12-week design and development boot camp, full-time position in the industry']}, {'end': 655.271, 'segs': [{'end': 198.662, 'src': 'embed', 'start': 171.342, 'weight': 0, 'content': [{'end': 176.463, 'text': 'If I click on that, we get the feedback submission and the customer dealer rating and comments.', 'start': 171.342, 'duration': 5.121}, {'end': 182.345, 'text': 'Okay, so this project is going to show you how to create a web app with Python and Flask.', 'start': 177.143, 'duration': 5.202}, {'end': 193.817, 'text': 'That will connect to a database, submit form data, whatever data you want, and also send an email through Python using SMTP, using MailTrap.', 'start': 182.965, 'duration': 10.852}, {'end': 198.662, 'text': 'And obviously you could switch that out with something like SendMail or whatever you want to use.', 'start': 193.897, 'duration': 4.765}], 'summary': 'Creating a web app with python and flask to submit form data and send emails using smtp and mailtrap.', 'duration': 27.32, 'max_score': 171.342, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM171342.jpg'}, {'end': 259.868, 'src': 'embed', 'start': 231.641, 'weight': 1, 'content': [{'end': 237.166, 'text': "so pip install, pip and V already have installed, so I'm not going to run that, but that will.", 'start': 231.641, 'duration': 5.525}, {'end': 246.173, 'text': "that will allow us to create a virtual environment so that when we install packages for our application and they'll all get installed on our virtual environment instead of on the global system.", 'start': 237.166, 'duration': 9.007}, {'end': 251.118, 'text': 'So to run the virtual environment we simply say pip ENV shell.', 'start': 246.754, 'duration': 4.364}, {'end': 259.868, 'text': 'OK, and you can see launching virtual environment gives you the path and then it creates this PIPVNV file, which will store all of our packages.', 'start': 252.543, 'duration': 7.325}], 'summary': "Using 'pip env shell' creates a virtual environment for installing application packages separately from the global system.", 'duration': 28.227, 'max_score': 231.641, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM231641.jpg'}, {'end': 385.255, 'src': 'embed', 'start': 349.8, 'weight': 2, 'content': [{'end': 355.944, 'text': "So we're going to do pipenv install and we're installing it as a flask extension.", 'start': 349.8, 'duration': 6.144}, {'end': 359.907, 'text': 'So flask dash SQL Alchemy.', 'start': 356.024, 'duration': 3.883}, {'end': 366.025, 'text': 'And it allow us to create database models and stuff like that.', 'start': 362.902, 'duration': 3.123}, {'end': 371.771, 'text': "And then let's see the last thing for now is going to be unicorn.", 'start': 366.686, 'duration': 5.085}, {'end': 376.616, 'text': 'So G unicorn, which is like an HTTP server.', 'start': 371.832, 'duration': 4.784}, {'end': 378.839, 'text': 'We need this for when we deploy to Heroku.', 'start': 376.657, 'duration': 2.182}, {'end': 381.812, 'text': 'I think that should be it.', 'start': 380.37, 'duration': 1.442}, {'end': 385.255, 'text': "Now I'm going to since I'm using V.S.", 'start': 381.952, 'duration': 3.303}], 'summary': 'Installing flask extension, sqlalchemy, and gunicorn for deployment to heroku.', 'duration': 35.455, 'max_score': 349.8, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM349800.jpg'}, {'end': 438.833, 'src': 'embed', 'start': 407.215, 'weight': 3, 'content': [{'end': 410.457, 'text': "It's probably going to prompt us to install PyLint, which is a linter.", 'start': 407.215, 'duration': 3.242}, {'end': 412.118, 'text': "We'll deal with that later.", 'start': 411.137, 'duration': 0.981}, {'end': 418.843, 'text': "But now we have everything installed, so let's create a folder called Templates, because the first thing I want to do is create our front end,", 'start': 412.679, 'duration': 6.164}, {'end': 419.844, 'text': 'which is our UI.', 'start': 418.843, 'duration': 1.001}, {'end': 422.926, 'text': "So Templates, we're also going to have a folder called Static.", 'start': 420.004, 'duration': 2.922}, {'end': 430.466, 'text': "Now, static is just that it's a static folder where like our CSS and images and stuff go.", 'start': 424.642, 'duration': 5.824}, {'end': 438.833, 'text': "So I'm going to just drag over my logo, which is this here and my style sheet, which you can get from the GitHub repository in the description.", 'start': 430.546, 'duration': 8.287}], 'summary': 'Setting up project folders for front-end development with templates and static folders.', 'duration': 31.618, 'max_score': 407.215, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM407215.jpg'}, {'end': 655.271, 'src': 'embed', 'start': 614.386, 'weight': 4, 'content': [{'end': 618.409, 'text': 'So basically we just have our logo and then an H1 and an H2.', 'start': 614.386, 'duration': 4.023}, {'end': 626.015, 'text': 'And to check these out, we can go ahead and I can open with live server or you can just open the HTML file just to see that it looks right.', 'start': 619.09, 'duration': 6.925}, {'end': 628.597, 'text': "OK, let's check the success page.", 'start': 626.035, 'duration': 2.562}, {'end': 632.346, 'text': 'All right, good.', 'start': 631.846, 'duration': 0.5}, {'end': 635.707, 'text': 'So we have our front end, our UI done, which is very, very simple.', 'start': 632.446, 'duration': 3.261}, {'end': 640.848, 'text': 'And some of you guys might be saying well, why not use react or something like that?', 'start': 636.767, 'duration': 4.081}, {'end': 644.249, 'text': "When you have an application like this, it's a simple there's.", 'start': 641.128, 'duration': 3.121}, {'end': 650.83, 'text': "it's a complete waste of time to use react, unless you really you plan on scaling it and you need a really interactive UI.", 'start': 644.249, 'duration': 6.581}, {'end': 652.29, 'text': "It's just a waste of time.", 'start': 651.31, 'duration': 0.98}, {'end': 655.271, 'text': "In my opinion, you don't need a front end framework for everything.", 'start': 652.33, 'duration': 2.941}], 'summary': 'Developed simple front-end ui without using react for a basic application.', 'duration': 40.885, 'max_score': 614.386, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM614386.jpg'}], 'start': 152.389, 'title': 'Creating a web app with python and flask', 'summary': 'Explains creating a web app with python and flask, connecting to a database, submitting form data, and sending an email through python using mailtrap, along with deploying to heroku, offering insights into setting up the environment, and installing necessary packages. it also discusses creating folders for templates and static, adding html and css files, and building front end ui using flask, emphasizing the simplicity of the process and the unnecessary use of front end frameworks like react for simple applications.', 'chapters': [{'end': 406.654, 'start': 152.389, 'title': 'Web app creation with python and flask', 'summary': 'Explains the process of creating a web app with python and flask, connecting to a database, submitting form data, and sending an email through python using mailtrap, along with deploying to heroku, offering insights into setting up the environment, and installing necessary packages.', 'duration': 254.265, 'highlights': ['The project demonstrates creating a web app with Python and Flask, connecting to a database, submitting form data, and sending an email through Python using MailTrap. It covers the entire process of creating a web app, connecting to a database, and sending an email using Python, offering a comprehensive guide for the audience.', 'The tutorial provides insights into setting up the environment, including installing Python 3, creating a virtual environment using pipenv, and installing necessary packages. It includes instructions for setting up the environment, such as installing Python 3, creating a virtual environment using pipenv, and installing required packages for the web app.', 'The chapter also offers guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and creating a production database. It provides guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and setting up a production database.']}, {'end': 655.271, 'start': 407.215, 'title': 'Creating front end templates and static files', 'summary': 'Discusses creating folders for templates and static, adding html and css files, and building front end ui using flask, emphasizing the simplicity of the process and the unnecessary use of front end frameworks like react for simple applications.', 'duration': 248.056, 'highlights': ['Creating folders for Templates and Static The chapter emphasizes the creation of specific folders for Templates and Static to organize HTML, CSS, and other static files.', 'Adding HTML and CSS files for front end UI The process involves adding HTML files for index and success pages, linking the style sheet, and inserting elements such as image, form, and dynamic message for user input validation.', 'Emphasizing simplicity and discouraging unnecessary use of front end frameworks The chapter highlights the simplicity of building front end UI using Flask and the unnecessary use of front end frameworks like React for simple applications, unless extensive scalability and interactivity are required.']}], 'duration': 502.882, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM152389.jpg', 'highlights': ['The project demonstrates creating a web app with Python and Flask, connecting to a database, submitting form data, and sending an email through Python using MailTrap. It covers the entire process of creating a web app, connecting to a database, and sending an email using Python, offering a comprehensive guide for the audience.', 'The tutorial provides insights into setting up the environment, including installing Python 3, creating a virtual environment using pipenv, and installing necessary packages. It includes instructions for setting up the environment, such as installing Python 3, creating a virtual environment using pipenv, and installing required packages for the web app.', 'The chapter also offers guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and creating a production database. It provides guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and setting up a production database.', 'Creating folders for Templates and Static The chapter emphasizes the creation of specific folders for Templates and Static to organize HTML, CSS, and other static files.', 'Adding HTML and CSS files for front end UI The process involves adding HTML files for index and success pages, linking the style sheet, and inserting elements such as image, form, and dynamic message for user input validation.', 'Emphasizing simplicity and discouraging unnecessary use of front end frameworks The chapter highlights the simplicity of building front end UI using Flask and the unnecessary use of front end frameworks like React for simple applications, unless extensive scalability and interactivity are required.']}, {'end': 1030.012, 'segs': [{'end': 689.243, 'src': 'embed', 'start': 656.471, 'weight': 0, 'content': [{'end': 658.253, 'text': "All right, so let's close those up.", 'start': 656.471, 'duration': 1.782}, {'end': 661.516, 'text': 'So we should be good as far as our templates.', 'start': 658.994, 'duration': 2.522}, {'end': 663.458, 'text': "Now let's start to deal with Python.", 'start': 661.616, 'duration': 1.842}, {'end': 668.042, 'text': "So I'm going to create an app.py file, which is going to be our entry point.", 'start': 663.478, 'duration': 4.564}, {'end': 673.488, 'text': "If you're familiar with Node and Express, it's similar to like an app.js or an index.js.", 'start': 669.023, 'duration': 4.465}, {'end': 678.517, 'text': "And in here, let's bring in flask or a couple of things from flask.", 'start': 674.555, 'duration': 3.962}, {'end': 681.979, 'text': 'So we want to import flask itself.', 'start': 679.558, 'duration': 2.421}, {'end': 689.243, 'text': 'We want to bring in something called render templates so that we can render our HTML files and then request to deal with request.', 'start': 682.079, 'duration': 7.164}], 'summary': 'Setting up python app with flask for rendering templates and handling requests.', 'duration': 32.772, 'max_score': 656.471, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM656471.jpg'}, {'end': 731.752, 'src': 'embed', 'start': 704.858, 'weight': 1, 'content': [{'end': 711.903, 'text': 'the way that we do that is, we do a decorator of at app, And this is going to be for the home page.', 'start': 704.858, 'duration': 7.045}, {'end': 712.864, 'text': 'So just slash.', 'start': 711.943, 'duration': 0.921}, {'end': 719.627, 'text': 'Then we define a method or a function called index or whatever you want.', 'start': 713.644, 'duration': 5.983}, {'end': 727.55, 'text': "And then we're just going to return render template and then pass in index HTML and it will render that template.", 'start': 719.867, 'duration': 7.683}, {'end': 731.752, 'text': 'And then finally for this to run, we need to call app.run.', 'start': 728.19, 'duration': 3.562}], 'summary': 'Creating a decorator for the home page by defining a method called index and using render template to render the index html.', 'duration': 26.894, 'max_score': 704.858, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM704858.jpg'}, {'end': 819.922, 'src': 'embed', 'start': 765.823, 'weight': 2, 'content': [{'end': 770.248, 'text': "So down here, let's run Python app dot pi.", 'start': 765.823, 'duration': 4.425}, {'end': 771.689, 'text': 'And there we go.', 'start': 771.169, 'duration': 0.52}, {'end': 772.35, 'text': "So it's running on 5000.", 'start': 771.709, 'duration': 0.641}, {'end': 772.991, 'text': "Let's open that up.", 'start': 772.35, 'duration': 0.641}, {'end': 779.876, 'text': "And you can see that it's running on 5000 and we get our form.", 'start': 775.513, 'duration': 4.363}, {'end': 780.957, 'text': 'All right.', 'start': 780.697, 'duration': 0.26}, {'end': 782.498, 'text': "So it's displaying that good.", 'start': 780.997, 'duration': 1.501}, {'end': 787.142, 'text': 'Next thing I want to do is handle the submit or start to handle the submit.', 'start': 783.459, 'duration': 3.683}, {'end': 792.986, 'text': "So our index page has a form that's making a post request to slash submit.", 'start': 787.362, 'duration': 5.624}, {'end': 795.448, 'text': 'So we need to handle that on our back end.', 'start': 793.547, 'duration': 1.901}, {'end': 797.63, 'text': "OK, so let's do.", 'start': 795.468, 'duration': 2.162}, {'end': 803.736, 'text': 'app dot route and we want slash submit.', 'start': 799.674, 'duration': 4.062}, {'end': 804.856, 'text': "That's what we're submitting to.", 'start': 803.776, 'duration': 1.08}, {'end': 812.419, 'text': "And since it's a post request, we actually have to assign methods and an array of allowed methods, which we want post.", 'start': 804.916, 'duration': 7.503}, {'end': 819.922, 'text': "And then let's say function or define submit.", 'start': 813.9, 'duration': 6.022}], 'summary': 'Python app running on 5000, handling post request to slash submit.', 'duration': 54.099, 'max_score': 765.823, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM765823.jpg'}, {'end': 997.558, 'src': 'embed', 'start': 969.767, 'weight': 3, 'content': [{'end': 975.529, 'text': "So let's say please enter required fields.", 'start': 969.767, 'duration': 5.762}, {'end': 980.751, 'text': "Now I'm going to save this and we have to have this message output somewhere in the template.", 'start': 975.689, 'duration': 5.062}, {'end': 984.753, 'text': 'And if you remember, I put this this to do right here.', 'start': 981.111, 'duration': 3.642}, {'end': 987.134, 'text': "So I'm going to replace this.", 'start': 985.513, 'duration': 1.621}, {'end': 991.596, 'text': 'I first want to check to make sure that the message exists.', 'start': 987.374, 'duration': 4.222}, {'end': 997.558, 'text': "So let's do if message and we use these percent curly braces and we want to end this if.", 'start': 991.896, 'duration': 5.662}], 'summary': 'Replace message in template if it exists', 'duration': 27.791, 'max_score': 969.767, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM969767.jpg'}], 'start': 656.471, 'title': 'Python web app development with flask', 'summary': 'Covers creating a python web app using flask, including setting up an entry point file, importing necessary modules, initializing the app, defining routes, and handling form submissions for post requests, data retrieval, validation, and template rendering.', 'chapters': [{'end': 765.142, 'start': 656.471, 'title': 'Creating a python web app with flask', 'summary': 'Covers setting up a python web app using flask, including creating an entry point file, importing necessary modules, initializing the app, defining a route for the home page, and running the server with debug mode set to true.', 'duration': 108.671, 'highlights': ['The chapter covers setting up a Python web app using Flask, including creating an entry point file, importing necessary modules, initializing the app, defining a route for the home page, and running the server with debug mode set to true.', 'The process involves creating an app.py file as the entry point for the web app, similar to app.js or index.js in Node and Express.', 'Key modules like flask, render_template, and request are imported to handle rendering HTML files and dealing with request parameters.', 'The app is initialized by setting it to flask and passing in double underscore, name, double underscore.', 'A route for the home page is defined using a decorator at app, allowing the rendering of an index HTML template.', 'The server is run with the condition app.debug set to true, ensuring automatic reloading during development.']}, {'end': 1030.012, 'start': 765.823, 'title': 'Handling form submission in python app', 'summary': 'Details the process of handling form submission in a python app, including routing, post request handling, form data retrieval, validation, and rendering templates, ensuring the user enters required fields and displaying messages in the template.', 'duration': 264.189, 'highlights': ['The process of handling form submission in a Python app is detailed, including routing, post request handling, form data retrieval, validation, and rendering templates. form submission in a Python app, routing, post request handling, form data retrieval, validation, rendering templates', 'The method to ensure the user enters required fields is described, involving simple validation and displaying messages in the template. ensuring user enters required fields, simple validation, displaying messages in the template', "The usage of 'app.route' and 'request.form' for routing and retrieving form data is explained. usage of 'app.route', usage of 'request.form', routing, retrieving form data"]}], 'duration': 373.541, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM656471.jpg', 'highlights': ['Covers creating a Python web app using Flask, including setting up an entry point file, importing necessary modules, and initializing the app.', 'Defines a route for the home page using a decorator at app and runs the server with debug mode set to true for automatic reloading during development.', 'Details the process of handling form submission in a Python app, including routing, post request handling, form data retrieval, validation, and rendering templates.', 'Describes the method to ensure the user enters required fields involving simple validation and displaying messages in the template.', "Explains the usage of 'app.route' and 'request.form' for routing and retrieving form data."]}, {'end': 2298.807, 'segs': [{'end': 1133.51, 'src': 'embed', 'start': 1070.605, 'weight': 0, 'content': [{'end': 1073.626, 'text': "And when you install Postgres locally, you'll get this.", 'start': 1070.605, 'duration': 3.021}, {'end': 1077.508, 'text': 'Over here, you can see database is one.', 'start': 1075.167, 'duration': 2.341}, {'end': 1079.489, 'text': "I'm going to create a new database.", 'start': 1077.528, 'duration': 1.961}, {'end': 1081.029, 'text': "I'm just going to call it Lexus.", 'start': 1079.629, 'duration': 1.4}, {'end': 1084.871, 'text': "And I'm going to use my Postgres user and save.", 'start': 1081.169, 'duration': 3.702}, {'end': 1089.082, 'text': 'It should create a new database.', 'start': 1087.64, 'duration': 1.442}, {'end': 1091.625, 'text': 'There we go.', 'start': 1089.102, 'duration': 2.523}, {'end': 1094.548, 'text': 'So now you can see I have the Lexis database here.', 'start': 1091.805, 'duration': 2.743}, {'end': 1100.274, 'text': "If I look in schemas and tables, we don't have any tables yet.", 'start': 1095.189, 'duration': 5.085}, {'end': 1101.696, 'text': "We'll add that in a bit.", 'start': 1100.314, 'duration': 1.382}, {'end': 1103.698, 'text': 'So we have the database.', 'start': 1102.457, 'duration': 1.241}, {'end': 1108.282, 'text': "Now let's go back to our application here.", 'start': 1104.499, 'duration': 3.783}, {'end': 1115.605, 'text': "now, when we deploy to heroku, we're going to have a completely different database, so you could just switch it up then.", 'start': 1108.282, 'duration': 7.323}, {'end': 1129.929, 'text': "but i'm just going to have a variable called n for environment and set this to dev, and then we'll say if the environment is equal to dev,", 'start': 1115.605, 'duration': 14.324}, {'end': 1133.51, 'text': "then we'll have our database.", 'start': 1129.929, 'duration': 3.581}], 'summary': "Installed local postgres, created 'lexus' database, no tables yet. will switch to different database when deploying to heroku.", 'duration': 62.905, 'max_score': 1070.605, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM1070605.jpg'}, {'end': 1310.656, 'src': 'embed', 'start': 1250.381, 'weight': 3, 'content': [{'end': 1258.003, 'text': "Right here we're going to say DB and we're going to set it to SQL Alchemy and just pass in our app.", 'start': 1250.381, 'duration': 7.622}, {'end': 1262.525, 'text': 'So then we can use that to query our database.', 'start': 1259.744, 'duration': 2.781}, {'end': 1270.148, 'text': 'Now, the way that SQL Alchemy works is we create models, okay, similar to what you would do with Mongoose or SQLize.', 'start': 1263.185, 'duration': 6.963}, {'end': 1274.249, 'text': "So I'm going to create a model right here.", 'start': 1270.168, 'duration': 4.081}, {'end': 1276.51, 'text': 'And we do this in the form of a class.', 'start': 1274.789, 'duration': 1.721}, {'end': 1278.19, 'text': 'You call this whatever you want.', 'start': 1277.15, 'duration': 1.04}, {'end': 1279.471, 'text': "I'm going to call it feedback.", 'start': 1278.21, 'duration': 1.261}, {'end': 1282.812, 'text': 'And this is going to extend the DB model.', 'start': 1280.511, 'duration': 2.301}, {'end': 1286.25, 'text': 'and inside.', 'start': 1285.349, 'duration': 0.901}, {'end': 1298.323, 'text': 'here we can define a table name, which is going to be feedback, and then we want to define our field.', 'start': 1286.25, 'duration': 12.073}, {'end': 1307.575, 'text': "so we're going to have an id and we can use that db variable and we're going to say db column, And it's going to be an integer.", 'start': 1298.323, 'duration': 9.252}, {'end': 1308.975, 'text': 'So DB integer.', 'start': 1307.615, 'duration': 1.36}, {'end': 1310.656, 'text': 'So we have different types we can use.', 'start': 1309.115, 'duration': 1.541}], 'summary': "Using sql alchemy to define a feedback model with table name 'feedback' and an id field as an integer.", 'duration': 60.275, 'max_score': 1250.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM1250381.jpg'}, {'end': 1799.247, 'src': 'embed', 'start': 1774.452, 'weight': 5, 'content': [{'end': 1781.336, 'text': 'the primary key, John Doe, is the customer, Tom Smith, rating 10 and then a comments.', 'start': 1774.452, 'duration': 6.884}, {'end': 1784.598, 'text': "all right, so we've successfully added data to the database.", 'start': 1781.336, 'duration': 3.262}, {'end': 1789.042, 'text': 'so the next thing i want to do is implement email.', 'start': 1786.081, 'duration': 2.961}, {'end': 1791.884, 'text': "okay, we don't want the data to just go in the database.", 'start': 1789.042, 'duration': 2.842}, {'end': 1793.785, 'text': 'we also want to send an email.', 'start': 1791.884, 'duration': 1.901}, {'end': 1795.866, 'text': "so we're going to be using mail trap for this.", 'start': 1793.785, 'duration': 2.081}, {'end': 1799.247, 'text': 'so we want to go to mailtrap.io, create an account.', 'start': 1795.866, 'duration': 3.381}], 'summary': 'John doe rated tom smith 10, then added email implementation using mailtrap.io', 'duration': 24.795, 'max_score': 1774.452, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM1774452.jpg'}, {'end': 1953.58, 'src': 'embed', 'start': 1915.828, 'weight': 7, 'content': [{'end': 1919.131, 'text': 'Put that in there and password.', 'start': 1915.828, 'duration': 3.303}, {'end': 1921.714, 'text': 'Grab that.', 'start': 1920.993, 'duration': 0.721}, {'end': 1932.305, 'text': "And there and then I'm going to create a message variable and I'm going to use an F string, which is just an easy way to.", 'start': 1923.896, 'duration': 8.409}, {'end': 1938.992, 'text': 'What the heck? Easy way to have variables in my string.', 'start': 1933.709, 'duration': 5.283}, {'end': 1940.173, 'text': "Let's use double quotes here.", 'start': 1939.032, 'duration': 1.141}, {'end': 1942.434, 'text': 'And we can also put HTML.', 'start': 1941.113, 'duration': 1.321}, {'end': 1949.618, 'text': "So I'm going to put an H3 and I'm going to say new feedback submission H3.", 'start': 1942.454, 'duration': 7.164}, {'end': 1953.58, 'text': "And then let's do a UL.", 'start': 1952.199, 'duration': 1.381}], 'summary': 'Creating a message variable using an f string with html tags for feedback submission.', 'duration': 37.752, 'max_score': 1915.828, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM1915828.jpg'}, {'end': 2154.181, 'src': 'embed', 'start': 2069.971, 'weight': 8, 'content': [{'end': 2073.833, 'text': 'Subject Which is going to be set to.', 'start': 2069.971, 'duration': 3.862}, {'end': 2077.395, 'text': "Let's set that to Lexus.", 'start': 2073.853, 'duration': 3.542}, {'end': 2083.418, 'text': 'Feedback And we want to do MSG.', 'start': 2079.417, 'duration': 4.001}, {'end': 2087.339, 'text': 'And we need to set the from.', 'start': 2085.598, 'duration': 1.741}, {'end': 2090.581, 'text': "And that's going to be the sender email.", 'start': 2088.76, 'duration': 1.821}, {'end': 2092.822, 'text': 'And then MSG2.', 'start': 2091.842, 'duration': 0.98}, {'end': 2099.461, 'text': 'which is going to be the receiver email.', 'start': 2097.079, 'duration': 2.382}, {'end': 2103.705, 'text': 'And then we want to finally send the email.', 'start': 2100.962, 'duration': 2.743}, {'end': 2112.272, 'text': 'And we do that by doing with SMTP lib dot SMTP.', 'start': 2104.225, 'duration': 8.047}, {'end': 2114.935, 'text': 'And we need to pass in the server.', 'start': 2113.373, 'duration': 1.562}, {'end': 2123.162, 'text': 'So SMTP server, which we defined above, as well as the port, which we defined above as server.', 'start': 2115.035, 'duration': 8.127}, {'end': 2133.45, 'text': "And then let's take that server object and call login and pass in our login and password.", 'start': 2125.106, 'duration': 8.344}, {'end': 2139.173, 'text': 'And then take server and call send mail.', 'start': 2134.831, 'duration': 4.342}, {'end': 2145.317, 'text': 'And we pass in our sender email, our receiver email.', 'start': 2140.414, 'duration': 4.903}, {'end': 2151.12, 'text': 'And then we do this msg.as underscore string.', 'start': 2146.477, 'duration': 4.643}, {'end': 2154.181, 'text': "OK, and we'll save that.", 'start': 2152.12, 'duration': 2.061}], 'summary': 'Using python to send emails with smtp, setting sender, receiver, and server details.', 'duration': 84.21, 'max_score': 2069.971, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2069971.jpg'}, {'end': 2213.982, 'src': 'heatmap', 'start': 2172.533, 'weight': 1, 'content': [{'end': 2178.84, 'text': "So make sure that's saved and then we'll go into app.py and let's bring in that function.", 'start': 2172.533, 'duration': 6.307}, {'end': 2186.249, 'text': "So we're going to say from send mail, import, send mail.", 'start': 2178.94, 'duration': 7.309}, {'end': 2189.292, 'text': 'And then we just simply need to call it.', 'start': 2187.39, 'duration': 1.902}, {'end': 2194.076, 'text': "So we'll go down after we I mean, it's up to you when you want to call it.", 'start': 2189.452, 'duration': 4.624}, {'end': 2197.019, 'text': 'I want to do it after it goes into the database.', 'start': 2194.236, 'duration': 2.783}, {'end': 2203.525, 'text': "So in our submit right after the commit before we redirect is where I'm going to call it.", 'start': 2197.859, 'duration': 5.666}, {'end': 2205.046, 'text': 'So send mail.', 'start': 2204.305, 'duration': 0.741}, {'end': 2209.45, 'text': 'Remember, it takes in the data, the customer, the dealer.', 'start': 2205.106, 'duration': 4.344}, {'end': 2213.982, 'text': 'the rating and the comments.', 'start': 2211.041, 'duration': 2.941}], 'summary': 'Import send mail function in app.py and call it after database commit in submit. it takes in data, customer, dealer, rating, and comments.', 'duration': 41.449, 'max_score': 2172.533, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2172533.jpg'}, {'end': 2209.45, 'src': 'embed', 'start': 2178.94, 'weight': 6, 'content': [{'end': 2186.249, 'text': "So we're going to say from send mail, import, send mail.", 'start': 2178.94, 'duration': 7.309}, {'end': 2189.292, 'text': 'And then we just simply need to call it.', 'start': 2187.39, 'duration': 1.902}, {'end': 2194.076, 'text': "So we'll go down after we I mean, it's up to you when you want to call it.", 'start': 2189.452, 'duration': 4.624}, {'end': 2197.019, 'text': 'I want to do it after it goes into the database.', 'start': 2194.236, 'duration': 2.783}, {'end': 2203.525, 'text': "So in our submit right after the commit before we redirect is where I'm going to call it.", 'start': 2197.859, 'duration': 5.666}, {'end': 2205.046, 'text': 'So send mail.', 'start': 2204.305, 'duration': 0.741}, {'end': 2209.45, 'text': 'Remember, it takes in the data, the customer, the dealer.', 'start': 2205.106, 'duration': 4.344}], 'summary': 'Code will call send mail function after data submission.', 'duration': 30.51, 'max_score': 2178.94, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2178940.jpg'}, {'end': 2298.807, 'src': 'embed', 'start': 2271.134, 'weight': 10, 'content': [{'end': 2280.518, 'text': 'and then, if we go to mail trap, we have a message here, lexus feedback, and if we check it out, we get kevin smith as the customer.', 'start': 2271.134, 'duration': 9.384}, {'end': 2282.459, 'text': 'tom smith is the dealer.', 'start': 2280.518, 'duration': 1.941}, {'end': 2285.863, 'text': 'five rating, tom was very pushy, All right.', 'start': 2282.459, 'duration': 3.404}, {'end': 2290.264, 'text': "So we're now sending an email and putting it into the database.", 'start': 2285.943, 'duration': 4.321}, {'end': 2295.406, 'text': 'And of course, you can apply this to many different situations, many different apps.', 'start': 2291.065, 'duration': 4.341}, {'end': 2298.807, 'text': 'So hopefully that that helps you guys out.', 'start': 2296.806, 'duration': 2.001}], 'summary': 'Kevin smith gave tom smith a five rating for being pushy in the lexus feedback email, which is now being sent and stored in the database.', 'duration': 27.673, 'max_score': 2271.134, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2271134.jpg'}], 'start': 1031.616, 'title': 'Implementing database and email in app', 'summary': "Covers setting up 'lexis' database in postgres using sqlalchemy in app.py, configuring development and production databases, creating database tables, making queries, and implementing email functionality. it focuses on postgres, python, sqlalchemy, and smtp lib.", 'chapters': [{'end': 1100.274, 'start': 1031.616, 'title': 'Implementing database in app using sqlalchemy', 'summary': "Covers the process of setting up and defining a new database, 'lexis', in postgres using sqlalchemy in the app.py file, and the creation of the database using pgadmin4.", 'duration': 68.658, 'highlights': ["Setting up and defining a new database, 'Lexis', in Postgres using SQLAlchemy in the app.py file The process involves creating a new database named 'Lexis' and defining the database URI or location in the app using SQLAlchemy.", "Creation of the database using pgAdmin4 The speaker uses pgAdmin4 to create the 'Lexis' database, utilizing the Postgres user and confirming the successful creation of the new database."]}, {'end': 1382.988, 'start': 1100.314, 'title': 'Configuring development and production databases', 'summary': 'Discusses configuring a development and production database for an application, including setting up environment variables, defining database connections, and creating database models using sqlalchemy, with a focus on a postgres database and specific data types and constraints.', 'duration': 282.674, 'highlights': ['The chapter discusses configuring a development and production database for an application, including setting up environment variables.', 'It explains the process of defining database connections, including specifying the database URI, username, password, and database name for a Postgres database.', "The chapter covers creating database models using SQLAlchemy, demonstrating the creation of a 'feedback' model with fields such as id, customer, dealer, rating, and comments."]}, {'end': 1644.667, 'start': 1383.768, 'title': 'Creating database table and making queries', 'summary': 'Discusses creating a database table based on a model, making queries, and ensuring that a customer does not exist in the database before adding data, using python and sqlalchemy, to connect the app to the database and enable queries.', 'duration': 260.899, 'highlights': ['The chapter discusses creating a database table based on a model and making queries to the database using Python and SQLAlchemy.', 'The process involves ensuring that a customer does not already exist in the database before adding data.', 'The chapter also includes using DB and session to query the database and make a count-based check to determine if a customer already exists.']}, {'end': 1913.026, 'start': 1645.792, 'title': 'Data submission and email implementation', 'summary': 'Covers the process of submitting data to a database and implementing email functionality using mailtrap.io, including setting up the email script and configuring smtp server details.', 'duration': 267.234, 'highlights': ['Implementing email functionality using mailtrap.io The chapter discusses the process of implementing email functionality using mailtrap.io, including setting up the email script and configuring SMTP server details.', 'Submitting data to a database and committing it The process of submitting data to a database and committing it is explained, involving the use of form data, DB session, and committing the data to the database.']}, {'end': 2298.807, 'start': 1915.828, 'title': 'Email feedback submission with python', 'summary': 'Discusses the process of creating a message variable, defining variables for sender and receiver email, and sending an email using smtp lib, including a demonstration of submitting feedback and receiving an email with the submitted data.', 'duration': 382.979, 'highlights': ['Demonstrating the process of creating a message variable, using an F string to include variables in the string, and adding HTML tags to the message to format it. ', 'Defining variables for sender and receiver email, setting the message type as HTML, creating the message subject, and setting the sender and receiver email addresses. ', 'Sending the email using SMTP lib by setting up the server, logging in with credentials, and sending the email with the message content. ', 'Submitting feedback for Kevin Smith, including the customer, dealer, rating, and comments, followed by a demonstration of receiving an email with the submitted data. Customer: Kevin Smith, Dealer: Tom Smith, Rating: 5, Comments: Tom was very pushy']}], 'duration': 1267.191, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM1031616.jpg', 'highlights': ["Setting up and defining a new database, 'Lexis', in Postgres using SQLAlchemy in the app.py file", 'Creation of the database using pgAdmin4', 'Configuring a development and production database for an application, including setting up environment variables', "Creating database models using SQLAlchemy, demonstrating the creation of a 'feedback' model with fields such as id, customer, dealer, rating, and comments", 'Creating a database table based on a model and making queries to the database using Python and SQLAlchemy', 'Implementing email functionality using mailtrap.io', 'Submitting data to a database and committing it', 'Demonstrating the process of creating a message variable, using an F string to include variables in the string, and adding HTML tags to the message to format it', 'Defining variables for sender and receiver email, setting the message type as HTML, creating the message subject, and setting the sender and receiver email addresses', 'Sending the email using SMTP lib by setting up the server, logging in with credentials, and sending the email with the message content', 'Submitting feedback for Kevin Smith, including the customer, dealer, rating, and comments, followed by a demonstration of receiving an email with the submitted data']}, {'end': 3203.166, 'segs': [{'end': 2369.539, 'src': 'embed', 'start': 2299.947, 'weight': 3, 'content': [{'end': 2300.267, 'text': 'All right.', 'start': 2299.947, 'duration': 0.32}, {'end': 2302.868, 'text': "So I think we're just about ready to deploy.", 'start': 2300.307, 'duration': 2.561}, {'end': 2307.529, 'text': 'So we have a bunch of steps that we have to go through to be able to do this.', 'start': 2303.988, 'duration': 3.541}, {'end': 2308.589, 'text': 'All right.', 'start': 2308.269, 'duration': 0.32}, {'end': 2313.331, 'text': "Now I'm going to just I'm going to stop my dev server here.", 'start': 2308.71, 'duration': 4.621}, {'end': 2316.652, 'text': "And you're going to need a Heroku account.", 'start': 2314.95, 'duration': 1.702}, {'end': 2319.476, 'text': 'OK, so you want to go to Heroku dot com, create an account.', 'start': 2316.672, 'duration': 2.804}, {'end': 2321.658, 'text': "You'll see a screen like this with all your apps.", 'start': 2319.516, 'duration': 2.142}, {'end': 2326.203, 'text': "And obviously you won't have any if you just create an account and then you need the Heroku CLI.", 'start': 2321.698, 'duration': 4.505}, {'end': 2328.426, 'text': "So let's say Heroku CLI.", 'start': 2326.343, 'duration': 2.083}, {'end': 2334.222, 'text': "And some of you might already have this installed, but it's easy to install Mac OS.", 'start': 2330.359, 'duration': 3.863}, {'end': 2335.543, 'text': 'You can download the installer.', 'start': 2334.242, 'duration': 1.301}, {'end': 2337.024, 'text': 'You can use homebrew windows.', 'start': 2335.583, 'duration': 1.441}, {'end': 2338.585, 'text': 'You have an installer and then Linux.', 'start': 2337.044, 'duration': 1.541}, {'end': 2342.048, 'text': 'You have some methods for different distros.', 'start': 2339.145, 'duration': 2.903}, {'end': 2347.091, 'text': 'So I already have it installed in the way that we do.', 'start': 2342.668, 'duration': 4.423}, {'end': 2348.372, 'text': 'This is with a git.', 'start': 2347.151, 'duration': 1.221}, {'end': 2350.594, 'text': 'So obviously you need git installed as well.', 'start': 2348.392, 'duration': 2.202}, {'end': 2353.776, 'text': "Now I'm going to create, first of all, a file.", 'start': 2351.134, 'duration': 2.642}, {'end': 2357.599, 'text': "I'm going to create my dot git ignore file.", 'start': 2353.796, 'duration': 3.803}, {'end': 2363.774, 'text': 'And basically, all I want to put in here is my dot.', 'start': 2359.631, 'duration': 4.143}, {'end': 2365.596, 'text': "Actually, I don't have a dot.", 'start': 2364.735, 'duration': 0.861}, {'end': 2369.539, 'text': 'You might have a dot vs code folder if you use pilot.', 'start': 2365.636, 'duration': 3.903}], 'summary': 'Preparing to deploy with heroku, setting up account, heroku cli, and git.', 'duration': 69.592, 'max_score': 2299.947, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2299947.jpg'}, {'end': 2453.182, 'src': 'embed', 'start': 2422.82, 'weight': 5, 'content': [{'end': 2432.584, 'text': 'OK, so now we want to create a Heroku application by saying Heroku create and then we can name this.', 'start': 2422.82, 'duration': 9.764}, {'end': 2433.925, 'text': "I'm going to call it Lexus.", 'start': 2432.624, 'duration': 1.301}, {'end': 2439.887, 'text': "Feedback in this has to be unique, so you won't be able to use that name.", 'start': 2435.745, 'duration': 4.142}, {'end': 2445.557, 'text': "And if you don't put a name, it'll just create some weird name for you.", 'start': 2441.934, 'duration': 3.623}, {'end': 2447.478, 'text': 'But now we have this URL.', 'start': 2445.957, 'duration': 1.521}, {'end': 2450.66, 'text': 'Now the app is not deployed yet.', 'start': 2447.518, 'duration': 3.142}, {'end': 2453.182, 'text': 'We just basically have it created.', 'start': 2450.72, 'duration': 2.462}], 'summary': 'Creating a heroku application named lexus, with a unique url, not yet deployed.', 'duration': 30.362, 'max_score': 2422.82, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2422820.jpg'}, {'end': 2508.019, 'src': 'embed', 'start': 2475.868, 'weight': 6, 'content': [{'end': 2480.108, 'text': "Of course, if you're doing production, then you definitely want to upgrade your Heroku.", 'start': 2475.868, 'duration': 4.24}, {'end': 2487.51, 'text': "But let's go back here and let's create a database add on so we can do Heroku.", 'start': 2480.749, 'duration': 6.761}, {'end': 2503.535, 'text': 'add-ons colon, and we want to do create and then Heroku, dash, postgresql and then colon.', 'start': 2489.625, 'duration': 13.91}, {'end': 2508.019, 'text': 'now this is a basically like a development database or a hobby database.', 'start': 2503.535, 'duration': 4.484}], 'summary': 'For production, upgrade heroku and add heroku postgresql as a development database.', 'duration': 32.151, 'max_score': 2475.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2475868.jpg'}, {'end': 2577.048, 'src': 'embed', 'start': 2545.959, 'weight': 13, 'content': [{'end': 2549.061, 'text': "And the way we can get that is simply by doing, let's clear this up.", 'start': 2545.959, 'duration': 3.102}, {'end': 2552.92, 'text': "Let's do Heroku.", 'start': 2551.499, 'duration': 1.421}, {'end': 2561.223, 'text': "And I'll probably put a, maybe I'll create a gist with all these commands so you guys don't get too confused and have to keep pausing.", 'start': 2553.66, 'duration': 7.563}, {'end': 2568.905, 'text': "Let's do Heroku config dash dash app and then the name of the app.", 'start': 2562.243, 'duration': 6.662}, {'end': 2575.708, 'text': 'And it gives us this database URL.', 'start': 2572.987, 'duration': 2.721}, {'end': 2577.048, 'text': 'So we want to grab that.', 'start': 2575.748, 'duration': 1.3}], 'summary': 'Using heroku, retrieve the database url for the app.', 'duration': 31.089, 'max_score': 2545.959, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2545959.jpg'}, {'end': 2709.435, 'src': 'embed', 'start': 2676.671, 'weight': 1, 'content': [{'end': 2685.775, 'text': 'One thing we want to do is create a requirements file requirements.txt which has all of the packages that are needed for this application.', 'start': 2676.671, 'duration': 9.104}, {'end': 2697.28, 'text': 'And the way that we create that is with pip freeze and then a greater symbol and then requirements.', 'start': 2686.315, 'duration': 10.965}, {'end': 2701.922, 'text': 'And now you can see it created this requirements file.', 'start': 2698.121, 'duration': 3.801}, {'end': 2704.924, 'text': 'Actually, it should be requirements.txt.', 'start': 2703.623, 'duration': 1.301}, {'end': 2709.435, 'text': "Let's just rename that .", 'start': 2707.534, 'duration': 1.901}], 'summary': 'Creating a requirements.txt file with pip freeze for application packages.', 'duration': 32.764, 'max_score': 2676.671, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2676671.jpg'}, {'end': 2904.968, 'src': 'embed', 'start': 2837.045, 'weight': 2, 'content': [{'end': 2841.749, 'text': 'You just want to make sure you have all these files before we attempt our deploy.', 'start': 2837.045, 'duration': 4.704}, {'end': 2848.068, 'text': "So now what we'll do is add everything to our git repository.", 'start': 2844.665, 'duration': 3.403}, {'end': 2849.769, 'text': "So we'll say git add all.", 'start': 2848.148, 'duration': 1.621}, {'end': 2851.751, 'text': 'Just do it in one line.', 'start': 2850.59, 'duration': 1.161}, {'end': 2858.897, 'text': 'So git add all to our staging area and git commit dash m.', 'start': 2851.811, 'duration': 7.086}, {'end': 2863.321, 'text': "And for comment, we'll just say initial deploy.", 'start': 2858.897, 'duration': 4.424}, {'end': 2868.015, 'text': 'So now everything is in the local repository.', 'start': 2865.254, 'duration': 2.761}, {'end': 2870.256, 'text': 'So now we need to push that to Heroku.', 'start': 2868.455, 'duration': 1.801}, {'end': 2875.558, 'text': 'But in order to do that, we need to add our remote repository.', 'start': 2870.296, 'duration': 5.262}, {'end': 2886.742, 'text': "So if we go to our application in our dashboard, Lexis feedback, and we go to deploy and you'll see a command like this Heroku get remote.", 'start': 2875.598, 'duration': 11.144}, {'end': 2892.684, 'text': 'So we want to just grab that and just go ahead and paste that in.', 'start': 2887.662, 'duration': 5.022}, {'end': 2896.085, 'text': "So now that's added as our remote repository.", 'start': 2893.644, 'duration': 2.441}, {'end': 2904.968, 'text': 'Now we can push to it by just doing git push to Heroku and the master branch.', 'start': 2896.145, 'duration': 8.823}], 'summary': 'Prepare files, add to git, push to heroku.', 'duration': 67.923, 'max_score': 2837.045, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2837045.jpg'}, {'end': 3152.777, 'src': 'embed', 'start': 3107.856, 'weight': 0, 'content': [{'end': 3108.396, 'text': 'And there it is.', 'start': 3107.856, 'duration': 0.54}, {'end': 3112.438, 'text': 'So we now have that data in our database on our server.', 'start': 3108.556, 'duration': 3.882}, {'end': 3114.399, 'text': 'And we should have got the email.', 'start': 3113.138, 'duration': 1.261}, {'end': 3115.3, 'text': "Let's check that out.", 'start': 3114.419, 'duration': 0.881}, {'end': 3116.721, 'text': "We'll go to mail trap.", 'start': 3115.52, 'duration': 1.201}, {'end': 3118.062, 'text': 'There it is.', 'start': 3117.542, 'duration': 0.52}, {'end': 3120.184, 'text': 'John Doe, Karen Swanson.', 'start': 3118.683, 'duration': 1.501}, {'end': 3128.512, 'text': 'So we now have a fully deployed app to Heroku, a Python app, a flask application that uses a database.', 'start': 3120.685, 'duration': 7.827}, {'end': 3132.816, 'text': 'So hopefully you learn quite a bit in this in this little tutorial.', 'start': 3129.112, 'duration': 3.704}, {'end': 3140.243, 'text': 'um, you know how to submit data, how to deploy it, how to send emails.', 'start': 3133.696, 'duration': 6.547}, {'end': 3146.49, 'text': "i mean it's a very simple little application, but there's a lot that you can build from this.", 'start': 3140.243, 'duration': 6.247}, {'end': 3152.777, 'text': 'one thing that i might suggest and and i always suggest expanding on tutorials when you watch a tutorial or a course,', 'start': 3146.49, 'duration': 6.287}], 'summary': 'A tutorial on deploying a python flask app to heroku and sending emails, with potential for expansion.', 'duration': 44.921, 'max_score': 3107.856, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM3107856.jpg'}], 'start': 2299.947, 'title': 'Deploying python flask app on heroku', 'summary': 'Covers deploying a python flask app on heroku, including creating requirements.txt, procfile, and runtime.txt, adding to git repository, pushing to heroku, and testing the deployed app. it also demonstrates the successful deployment of a fully functional python flask application with a database and email functionality, providing insights into expanding the application with authentication.', 'chapters': [{'end': 2342.048, 'start': 2299.947, 'title': 'Deploying application on heroku', 'summary': 'Covers the necessary steps to deploy an application on heroku, including creating an account, installing the heroku cli, and the availability of installation methods for different operating systems.', 'duration': 42.101, 'highlights': ['Creating a Heroku account is the initial step required for deployment. A Heroku account needs to be created in order to proceed with the deployment process.', 'Installing the Heroku CLI is a crucial step in the deployment process. The installation of the Heroku CLI is essential for the deployment of the application on Heroku.', 'Different installation methods are available for various operating systems such as Mac OS, Windows, and Linux. Installation methods for the Heroku CLI are tailored for different operating systems, including Mac OS, Windows, and Linux.']}, {'end': 2675.388, 'start': 2342.668, 'title': 'Setting up heroku for python application', 'summary': 'Explains how to set up a python application with heroku, including creating a .gitignore file, initializing a git repository, logging into heroku, creating an app, adding a postgres database, and configuring the production database.', 'duration': 332.72, 'highlights': ['The chapter demonstrates setting up a Python application with Heroku, including creating a .gitignore file, initializing a git repository, logging into Heroku, creating an app, adding a Postgres database, and configuring the production database.', 'The process includes creating a .gitignore file to exclude specific files and directories, such as .vscode and __pycache__, from being committed to the repository, ensuring a clean version control history.', 'When setting up the Heroku app, the chapter emphasizes the importance of creating a unique app name and demonstrates the process of creating a Heroku app and verifying its creation through the Heroku dashboard.', 'Furthermore, the chapter explains the steps to add a Postgres database as an add-on with Heroku, including specifying the database type as hobby and associating it with the created app.', "Additionally, the chapter details the process of obtaining the production database URL from Heroku, clarifying the use of 'Heroku config --app ' to retrieve the database URL for configuration in the production environment."]}, {'end': 3203.166, 'start': 2676.671, 'title': 'Deploying python flask app on heroku', 'summary': 'Explains the process of deploying a python flask app on heroku, including creating requirements.txt, procfile, and runtime.txt, adding to git repository, pushing to heroku, and testing the deployed app, demonstrating the successful deployment of a fully functional python flask application with a database and email functionality, providing insights into expanding the application with authentication.', 'duration': 526.495, 'highlights': ['The successful deployment of a fully functional Python Flask application with a database and email functionality The tutorial demonstrates the successful deployment of a fully functional Python Flask application with a database and email functionality, showcasing the practical implementation of deploying a complex web application.', 'Creating requirements.txt, procfile, and runtime.txt for the application The process involves creating requirements.txt, procfile, and runtime.txt to specify the required packages, application execution command, and Python version, essential for the proper functioning of the deployed application.', 'Adding and pushing the application to the git repository and Heroku The tutorial covers the steps of adding the application to the git repository and pushing it to Heroku, demonstrating the version control and deployment process, ensuring the availability and accessibility of the application on the Heroku platform.', "Testing the deployed app and expanding it with authentication The tutorial highlights the importance of testing the deployed app and suggests expanding it with authentication, providing valuable insights into enhancing the application's functionality and security measures."]}], 'duration': 903.219, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/w25ea_I89iM/pics/w25ea_I89iM2299947.jpg', 'highlights': ['The successful deployment of a fully functional Python Flask application with a database and email functionality', 'Creating requirements.txt, procfile, and runtime.txt for the application', 'Adding and pushing the application to the git repository and Heroku', 'Different installation methods are available for various operating systems such as Mac OS, Windows, and Linux', 'The process includes creating a .gitignore file to exclude specific files and directories, such as .vscode and __pycache__, from being committed to the repository, ensuring a clean version control history', 'When setting up the Heroku app, the chapter emphasizes the importance of creating a unique app name and demonstrates the process of creating a Heroku app and verifying its creation through the Heroku dashboard', 'Furthermore, the chapter explains the steps to add a Postgres database as an add-on with Heroku, including specifying the database type as hobby and associating it with the created app', 'The process involves creating requirements.txt, procfile, and runtime.txt to specify the required packages, application execution command, and Python version, essential for the proper functioning of the deployed application', 'The installation of the Heroku CLI is essential for the deployment of the application on Heroku', 'Installing the Heroku CLI is a crucial step in the deployment process', 'Creating a Heroku account is the initial step required for deployment. A Heroku account needs to be created in order to proceed with the deployment process', "Testing the deployed app and expanding it with authentication The tutorial highlights the importance of testing the deployed app and suggests expanding it with authentication, providing valuable insights into enhancing the application's functionality and security measures", 'The tutorial covers the steps of adding the application to the git repository and pushing it to Heroku, demonstrating the version control and deployment process, ensuring the availability and accessibility of the application on the Heroku platform', "The process of obtaining the production database URL from Heroku, clarifying the use of 'Heroku config --app ' to retrieve the database URL for configuration in the production environment", 'The chapter demonstrates setting up a Python application with Heroku, including creating a .gitignore file, initializing a git repository, logging into Heroku, creating an app, adding a Postgres database, and configuring the production database']}], 'highlights': ['The successful deployment of a fully functional Python Flask application with a database and email functionality', 'The project demonstrates creating a web app with Python and Flask, connecting to a database, submitting form data, and sending an email through Python using MailTrap. It covers the entire process of creating a web app, connecting to a database, and sending an email using Python, offering a comprehensive guide for the audience.', 'The tutorial provides insights into setting up the environment, including installing Python 3, creating a virtual environment using pipenv, and installing necessary packages. It includes instructions for setting up the environment, such as installing Python 3, creating a virtual environment using pipenv, and installing required packages for the web app.', 'The chapter also offers guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and creating a production database. It provides guidance on deploying the web app to Heroku, including using Gunicorn as an HTTP server and setting up a production database.', 'Creating a feedback application for a dealership, form interacting with a database, email sending functionality', "Setting up and defining a new database, 'Lexis', in Postgres using SQLAlchemy in the app.py file", 'Configuring a development and production database for an application, including setting up environment variables', "Creating database models using SQLAlchemy, demonstrating the creation of a 'feedback' model with fields such as id, customer, dealer, rating, and comments", 'Submitting data to a database and committing it', 'Sending the email using SMTP lib by setting up the server, logging in with credentials, and sending the email with the message content', 'The process involves creating a .gitignore file to exclude specific files and directories, such as .vscode and __pycache__, from being committed to the repository, ensuring a clean version control history', 'The process includes creating requirements.txt, procfile, and runtime.txt to specify the required packages, application execution command, and Python version, essential for the proper functioning of the deployed application', 'The tutorial covers the steps of adding the application to the git repository and pushing it to Heroku, demonstrating the version control and deployment process, ensuring the availability and accessibility of the application on the Heroku platform', "The process of obtaining the production database URL from Heroku, clarifying the use of 'Heroku config --app ' to retrieve the database URL for configuration in the production environment"]}