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

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] this video is sponsored by dev Mountain if you're interested in learning web development iOS or UX design dev Mountain is a 12-week design and development boot camp intended to get you a full-time position in the industry to learn more visit dev mountain comm or click the link in the description below hey what's going on guys so in this video we're gonna build a Python web app we're actually gonna deploy it as well to Heroku and it's a feedback application for a Lexus dealership of course you can use whatever you want you could it could be a completely different form basically it's going to show you how to have a form that goes to a database also it's gonna send an email and we're going to use mail trap do which is a great service for development basically it gives you a place for your application to send emails before you go and actually create you know an email client for you know send mail or whatever you might use in production so it's a it's a great service for development you do have to create an account but it is free and you just need to basically plug these parameters into your application which we'll be doing you also need postgrads we're going to be using PostgreSQL for our database so you just need to download it so if you're on Windows click here Linux I'm on a Mac so I would go here and then download the Installer and grab the latest version and once you do that once you install it you'll have postcards on your system you'll also have PG admin which I have running here which is basically just a way to admin your databases so we'll get to this later on but those are the two things you're going to want to do actually 3 things you also want to create an account at Heroku if you're going to deploy this and you can see I have my Heroku Postgres database I've never showed you guys in a video how to deploy a Python app to Heroku so even just that part of the video is gonna be beneficial to you and like I said we'll be using the flask framework so that's that's pretty much what's gonna go into this so just to show you how this works we can put a name in here let's just say Jax so customer name let's say we just bought Alexis we dealt with I don't know Karen Swanson and she did great so we'll give her a ten and we'll just say Karen was very helpful and then once we click Submit it's gonna immediately take us to a thank-you page or a success page but what happened was that data that we just submitted went to the Postgres database which is our Heroku Postgres in this case we're gonna start off local but then once we deploy we'll create a production database and then it also sent an email to mail trap as you can see right here lexis feedback if I click on that we get the feedback submission and the customer deal our rating and comments okay so this project is going to show you how to create a web app with Python and flask that will connect to a database submit form data whatever data you want and also send an email through Python using SMTP using mail trap and obviously you could switch that out with something like send mail or whatever you want to use so it's gonna teach you quite a bit and how to deploy to Heroku which I've never made a video showing you how to deploy a Python app so it should be pretty interesting I would suggest following along so let's get started I'm gonna jump into vyas code and I just have an empty folder called feedback app and I'm just gonna open up my terminal so make sure you have Python 3 installed if you don't just go to Python org and download and install it and we need to create a virtual environment we're gonna use Pippy and V for that so you want to install that with the pip package manager so pip install pip and V I already have installed so I'm not gonna run that but that will 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 a virtual environment instead of on the global system so to run the virtual environment we simply save pip E&V shell ok and you can see launching virtual environments gives you the path and then it creates this Pippy env file which will store all of our packages also as the Python version which you can see is version 3 so if I do Python - - version I mean I have three point seven zero I think the latest is 374 but I should be fine all right so I'm just gonna clear that up and to get out of the virtual environment you can just do exit but I'm not gonna run that so I think what I want to do now is just install all the packages we need just to get that out of the way if you have any issues you can you know check out the error message or whatever but to install packages we use pipi and V install and let's install flask first which is our web framework and you'll see it gets added here it's just like a package Jason for nodejs then we'll do pipi and V install and we're gonna need this psycho PG which is PS YC o PG - and this is a database adapter we need this in order to work with Postgres now sometimes this gives at least for me on some certain systems it gives me issues so I'm also going to install psycho PG - - binary just in case alright and then we also want to install SQL alchemy which is kind of like a abstract layer to work with our database similar to something like Mongoose or SQL eyes or sequel eyes whatever you want to call it so we're gonna do PIP E&V install and we're installing it as a flask extension so flask - SQL alchemy and it allow us to create database models and stuff like that and then let's see the last thing for now is gonna be unicorn so G unicorn which is like an HTTP server we need this for when we deploy to Heroku and I think that should be it now I'm going to send some using vs code I'm gonna do a shift shift command P or shift control P and you want to just type in Python and then select interpreter and make sure you have the right interpreter with which in my case is this right here feed back up okay so gonna make sure we select that okay and we should be all set for packages at least for now it's probably gonna prompt us to install PI lint which is a linter I will deal with that later 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 which is our UI so templates we're also gonna have a folder called static now static is just that it's a static folder we're like our CSS and images and stuff go so I'm gonna just drag over my logo which is this here and my stylesheet which you can get from the github repository in the description really simple we just have a reset we have some body styles container some headings message logo and then some form styling to make the form look decent okay and if you want to change some stuff up for the styling you can of course let me just turn that turn my volume down so you don't get that email notification okay so that's static now templates is where our HTML goes our templates so we're gonna say index.html we're also gonna have a success dot HTML those are the only two pages we need index.html let's create a boilerplate here and let's say please rate your service and let's link our style sheet which is one level above and static and style.css okay and then let's see in the body we're gonna have a container class and let's have our image at the top which is going to be dot dot slash static slash logo.png one slash and alts say Lexus and then give this a class of logo okay under that we're going to have we're actually gonna have a message output here dynamic message for like if if they forget to put the the customer name or something like that so I'm just going to put a comment for now with a to do to put a message here alright because these are dynamic templates and then under that we're gonna have our form and the action is gonna go to a route slash submit which are going to create with flask and let's add a method of post we want this to be a post request alright and then what I'm gonna do is just paste in each form group or each input one by one so we have a div with the class of form group h3 for the label and then an input and this is a text input make sure you have the name attribute because that's how we're actually gonna grab the data on the back end okay so that's the customer name I'm gonna grab the next one which is the dealer so another div with the class of form group with a select name of dealer with some options then we're gonna have the rating which is just some radio buttons so name rating value 1 through 10 10 is checked and then the let's see the comments and the submit button so we have another div with the class of form group comments about your experience named comments and then our submit button and that's it so I'm going to save it and the success HTML I'm just gonna pasting because that's really simple so basically we just have our logo and then an h1 and an h2 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 ok let's check the success page all right good so we have our front-end or UI done which is very very simple and some of you guys might be saying why not use react or something like that when you have an application like this it's as simple there's 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 it's just a waste of time in my opinion you don't need a front-end framework for everything all right so let's close that those up so we should be good as far as our templates now let's start to deal with Python so I'm going to create an app dot PI file which is going to be our entry point if you're familiar with node and Express it's similar to like an app j/s or an index jas and in here let's bring in flask are a couple things from flask so we want to import flask itself we want to bring in something called render template so that we can render our HTML files and then request to deal with request parameters and things like that then we need to initialize our app we do that by just setting it to flask and then we pass in double underscore name double underscore and let's create a route the way that we do that is we do a decorator of at app dot route and this is going to be for the home page so just slash then we define a method or function called index or whatever you want and then we're just going to return render template and then pass in index.html and it will render that template and then finally for this to run we need to call app dot run but we just want to do this if statement first so if name is equal to double underscore main so just making sure this is important this is actually running and then app dot run and that should be that should allow us to run our server oh one more thing I want to do is just set app debug to true hopes no semicolon because we're in development and we want the server to keep reloading and stuff like that so down here let's run Python app dot pi and there we go so it's running on five thousand let's open that up and you can see that running on five thousand and we get our form alright so it's displaying that good next thing I want to do is handle the submit or start to handle the submit so our index page has a form that's making a post request to slash submit so we need to handle that on our back end okay so let's do app dot wrote and we want slash submit that's what we're submitting to and since it's a post request we actually have to assign methods and an array of allowed methods which we want post and then let's say function or define submit okay now I want to make sure that it's a post request so I'm gonna do an if statement here and we can grab that request object and it has a property called method which will give us the method that was called we want to make sure it's post and then let's get the data the form data and put those into variables so we'll say customer equals and we can do request dot form and then brackets and whatever the name of that field so in this case we want to get this field here which has the name of customer so we want to use customer in here okay we have four fields I believe and we want oops what's the next one dealer dealer and then this one here which is rating okay and then we want this one is comments okay so that should get the data from the form now I just want to print out this data so let's print out customer dealer rating comments and then it's ours what we want to return I'm just gonna render template and let's render the success page okay so once we make our request we submit the form we should get the data it should print it in the console and then we should render the success page if everything is right so let's say John Doe dealer will do ten and we'll just say test submit so it redirects us good let's check the console we get John Doe Tom Smith 10 and test okay so we know we're getting that form data and comment that out so next thing I want to do is make sure that the user enters a customer and a dealer so just do some simple validation so we'll say if customer is equal to nothing or dealer is equal to nothing then let's go ahead and return render template except we want to return index.html which is the home page but we want to send along a message okay with templates we can send along data so let's say please enter required fields now I'm gonna save this and we have to have this message output somewhere in the template and if you remember I put this this to do right here so I'm going to replace this I first want to check to make sure that the message exists so let's do if message we use these percent curly braces and we want to in this if okay and then here I'll do a paragraph with the class of message and we use our double curly brace syntax similar to what you would do in like view or angular and then let's put our message and we can ask add these pipe characters and then I'm gonna put safe which just is a little bit of security for our output so let's save that and let's try out that validation so if I clear this up clear that up and there we go we get please enter required fields okay so now that we've done that I think we're ready to start to implement the database so let's close that up and let's go back to our app pie and we need to bring in SQL alchemy okay SQL came-- now we need to define our database URI or database location so I'm gonna head into PG admin for and and when you install post-grad local you'll get this over here you can see database is one I'm gonna create a new database I'm just going to call it Lexus and I'm gonna use my post-grad user and save that should create a new database there we go so now you can see I have the Lexus database here if I look in schemas and tables we don't have any tables yet we'll add that in a bit so we have the database now let's go back to our application here now when we deploy to Heroku we're gonna have a completely different database so you could just switch it up then but I'm just gonna have a variable called n for environment and set this to dev and then we'll say if the environment is equal to dev then we'll have our database else then we'll have the production database now another thing that I want to change well if we're in development mode of production mode is this here app debug so I'm gonna take that away from there and set that for in development mode set it to true if we're wait a minute no it's wrong for in development mode set it to true else set it to false okay and then here we'll put our development database and the way that we do that is app config and this is all in the SQL alchemy documentation if you want to check that out but we want to do config and then the key here is SQL alchemy underscore database underscore URI okay and what we want to set this to is PostgreSQL and then the username which mine I'm using the root post-grad user colon and then the password which mine is just one through six at localhost / and then your database name which mine is lexis okay down here we'll have our production database actually I'll just grab this and for now I'll just set this to nothing it'll deal with that later all right and then there's one app.config value we want to add or we're gonna get a warning in the console and that's SQL alchemy underscore track modifications and we want to set that to false okay or also we're going to get a warning so that should connect us now we need to create a database object so the way that we do that is right here right here we're gonna say DB and we're gonna set it to SQL alchemy and just pass in our app so then we can use that to query our database now the way that SQL alchemy works is we create models okay similar to what you would do with Mongoose or sequel eyes so I'm going to create a model right here and we do this in the form of a class you call this whatever you want I'm gonna call it feedback and this is going to extend the DB model and inside here we can define a table name which is gonna be feedback and then we want to define our field so we're gonna have an ID and we can use that DB variable and we're gonna say DB column and it's going to be an integer so DB integer so we have different types we can use and this is also going to be the primary key so we're going to set that to true okay next one is going to be the customer so DB dot column and this is going to be a string so I'm gonna do DB dot string let's say 200 limit and I want to make this unique so we'll say unique equals true and then we have a couple more let's see we can actually get rid of this so this next one is gonna be what the dealer which will also be a string so I'll leave that and then call this dealer and then we have rating so rating is going to be an integer we can get rid of unique and DB dot integer like that and then this last one is going to be the comments comments is going to be the text field which is like a longer field we don't need to put that in and we don't want this okay so that's those are the fields that we want so our class or our model also needs a constructor or I guess an initializer so we're gonna define double underscore and NIT okay so if you're familiar with object-oriented programming in other languages this is similar to a constructor it takes in self which is like you know like this keyword and then it takes in all the fields we want which are customer all the fields except the ID dealer rating and comments and then we simply want to set self dot customer to the customer that's passed in oops no semicolons and do the same for the others dealer and this is gonna be this rating and this is gonna be comments okay and that's it so that's our model I'm gonna save this and I just have format on save and able that's why I saw that it kind of changed a little bit when I saved so that's our model now we should be able to make queries to our database wherever we want so let's go back down to the submit so right now we're just kind of redirecting to success where we haven't done anything with the database but before we do that we actually have to we have to create the feedback table and we can actually create that based on our model all right so I'm gonna just stop the server with ctrl C for a second and I'm gonna just go into Python so I'm just going to type Python and from here I'm gonna bring in dB I'm gonna say from apps so from our app file let's import DB and then we can say DB dot creates underscore all and some parentheses and that should look at our model look at our database and create the table from it the feedback table okay feedback table with all these fields so now we can exit from this and we can run our server again and now we can actually check this through PG admin so I'm just gonna let's see let's refresh our schemas in the Lexus database and go to tables and there it is feedback so if we look at feedback and we look at columns there's a ID customer dealer rating comments okay so we now have our database we have our table we have our app connected to our database so now we want to be able to make queries and stuff so in the submit let's go right above where we render success and let's see let's first check to make sure that the customer doesn't already exist because we don't want the same customer to be able to submit more than one feedback so the way that we can do that is with an if statement now when we deal with the database we use DB and then dot session okay now I want to make a query so I'm gonna do session dot query we need to pass in our model which is feedback and then we can filter and what I want to do is say feedback on a filter where feedback dot customer is equal to the customer variable which is this which is where the data comes in and I want to count that so dot count and if that is equal to zero that means that that customer does not exist just close that all right so that means that the customer does not exist and that now I want to basically add the data to the database so the way that we do that is first of all create a variable call it data and we need to set that to our model which is feedback and you can have multiple models obviously and in feedback I'm gonna have I'm gonna put in our customer dealer so this is basically the form data that we want to submit rating comments okay so we have data now we need to DB dot session dot add and we want to add that data now that's not going to put it in the database just yet we need to commit it so we need to do DB dot session dot commit like that now if if that if all goes well then we want to return the success so we want to indent this over one yeah well indent that over one because once it's added we want to redirect to success now if this is false we want to basically rerender the index so I'll just copy that put that on the same level as this if okay because basically this will run if this is not true if this is true then all this stuff will run I just want to change the message up to you have already submitted submitted feedback okay and that should do it so let's save that and let's cross our fingers and try this out so I'm just gonna go back to 5,000 let's say John Doe dealer Tom Smith will give him a ten will say Tom was very helpful okay so we get redirected so hopefully it went into the database let's go to PG admin and let's go to our feedback table and let's refresh and now if we go to columns not columns feed back again and we choose view edit data all rows there it is so ID one so it's gonna be auto increments the primary key John Doe is the customer Tom Smith rating ten and then a comments alright so we've successfully added data to the database so the next thing I want to do is implement email okay we don't want the data to just go in the database we also want to send an email so we're gonna be using mail trap for this so you want to go to mail trap I owe create an account you should see something like this you'll have a specific username and password don't use mine use your own and we're going to create a new file to handle the email so I'm going to create a file called send underscore mail dot pie alright so in this let's in this e-mail script we're going to bring in a couple things so one is the SM TP library smtp lib and we're also going to say from email dot mime dot txt we want to import mime text which will allow us to send text and HTML emails okay and let's create a function called send underscore mail and it's going to take in so the data we want to email which is the customer or the deal or the rating in the comments okay now there's a few things we need to set here so port is gonna be two five two five now it depends on the service you're using for email this stuff this relates to mail trap so we want to send the SMTP underscore server which is smtp.mail.yahoo.com three and I'm gonna say new feedback submission h3 and then let's do a ul you can style this or you know you can create whatever you want here I'm just doing an unordered list so - Li and in here let's do customer : and since we use an F string we can simply put variables in like this it's like a template literal in JavaScript okay and it'll just copy this Li and paste it in 2 3 4 more times and the second one is gonna be dealer taylor and this will be the rating this will be rating okay and comments comments okay so that's the message now we have to define some more variables here so the sender email is gonna be I'm just going to use email one at example.com obviously you would use your you know your real domain name and then receiver let's do receiver email and I'm just going to set that to email - at example.com okay and then we need to create this MSG or you could use whatever I'm going to use msg and then we want to set this equal to mime text and pass in our actual message that we created above and then the type of email we want which is going to be HTML okay you can have text or HTML and then we need to create msg subject which is going to be set to let's set that to Lexus feedback and we want to do MSG and we need to set the from and that's going to be the send our email and then MSG to which is going to be the receiver email okay and then we want to finally send the email and we do that by doing with SMTP Lib dot SMTP and we need to pass in the server so SMTP server which we defined above as well as the port which we defined above server and then let's take that server object and call login and pass in our login and password and then take server and call send mail and we pass in our send our email our receive our email and then we do this MSG dot as underscore string okay and it'll save that now this will be a bit different depending on what service you're using if you're using Gmail or send mail whatever this will be a little different obviously you know we're using mail traps so we need these specific logins and passwords and stuff but I believe that's all we need here so make sure that's saved and then we'll go into a pan that function so we're gonna say from send mail imports send man and then we just simply need to call it so we'll go down after we I mean it's up to you when you want to call it I want to do it after it goes into the database so in our submit right after the commit before we redirect is where I'm gonna call it so send me I'll remember it takes in the data the customer the dealer the rating and the comments okay and that should do it hopefully so now when I submit it should not only go in the database but it should also send an email to mail trap and I just want to show you if I try to do John Doe again it shouldn't let me because I already did him so if I submit you have already submitted feedback so let's do someone else will do Kevin Smith and will say is he's dealing with his cousin Tom Smith gives him a five just because he has some some issues with him tom was very pushy and submit okay so we got redirected let's check the database so we already have this select all from feedback let's run this and there's Kevin Smith 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 Tom Smith is the dealer five rating tom was very pushy all right so we're now sending an email and putting it into the database and of course you can apply this to many different situations many different apps so hopefully that that helps you guys out all right so I think we're just about ready to deploy so we have a bunch of steps that we have to go through to be able to do this all right now I'm gonna just gonna stop my dev server here and you're gonna need a Heroku account okay so you want to go to Heroku comm create an account you'll see a screen like this with all your apps and obviously you won't have any if you just created an account and then you need the Heroku CLI so let's say Roku CLI and some of you might already have this installed but it's easy to install Mac OS you can download the Installer you can use homebrew windows you have an installer and then Linux you have some methods for different distros so I already have it installed and the way that we do this is with git so obviously you need get installed as well now I'm going to create first of all a file I'm gonna create my dot get ignore file and basically all I want to put in here is my dot actually I don't have a dot you might have a dot vs code folder if you use pilant so I'm just gonna put that in there and then double underscore PI cache that will get created and you don't want to you don't want to commit that so I think that's all we need in there and then let's initialize a git repository with git init and then we're going to actually I'll just initialize it for now so we want to create a Heroku app so if you have the CLI installed you should be able to do Heroku dash dash version and it'll show you your version I think mine's a little out of date but then you want to do Heroku login so press any key to open your browser and you just want to login just click that and then if we go back you can see I'm logged in as this email okay so now we want to create a Heroku application by saying Heroku create and then we can name this I'm going to call it Lexus feedback and this has to be unique so you won't be able to use that name and if you don't put a name and they'll just create some weird name for you but now we have this URL now the app is not is not deployed yet we just have the we just basically have it created so if we go back to my dashboard or you go back to your dashboard then reload you'll see this Lexus feedback or whatever you called it now before we try to deploy we need to create a database now a postgrads is offered as an add-on with Heroku and you get it you get I think you get one free database with the free account of course if you're doing production then you definitely want to upgrade your Heroku but let's go back here and let's create a database add-on so we can do Heroku add-ons : and we want to do create and then Heroku - PostgreSQL and then : now this is a basically like a development database or a hobby database so we want to do hobby - dev - - app and we want to we want to tell it which app we want it to use because you can have more than one app on Heroku so I want to use Lexus feedback alright so let's try and run that see what happens okay so created an empty database just say so created this as database URL now in our application we have our uri for our dev database but we don't have one for our production in the way we can get that is simply by doing let's clear this up let's do Heroku and I'll probably put it maybe I'll create a gist with all these commands so you guys don't get too confused and have to keep you know pausing let's do Heroku config - - app and then the name of the app and it gives us this database URL so we want to grab that okay which is just a long you know has a username and password we want to put that right here for production oops what happened did I copy that right this just there we go okay so that is our production database now I'm gonna go ahead and switch the environment to prod so that this will now be in effect instead of this and save that I think that's all we have to do here so yeah this stuff will all be the same all the mail stuff now remember when we created we created the table the feedback table in our database locally we need to do that we need to do that on our remote database as well so though we can actually do Heroku run Python actually sorry we don't want to do this yet I'm gonna I'm gonna exit out of this because we don't have exit okay and the reason I'm not going to do this yet is because we need to import DB from our App file but we don't have our app file uploaded yet so we're not gonna do that just yet let's see and I'll have I'm gonna create a gist that has all the steps for you guys one thing we want to do is create a requirements file the requirements txt which has all of the packages that are needed for this application and the way that we create that is with pip freeze and then a greater symbol and then requirements and now you can see it created this requirements file actually should be requirements txt let's just rename that dot txt okay so it has you know all the stuff as some additional things that I have a most in my environment as well but now that we've done that let's see the next thing we want to do is create something called the proc file because it has to know Heroku it's a it's a it's a sass basically our pass a platform as a service and it needs to know how to run the application so we're gonna go ahead and just touch which will just create a file and then proc files of capital P proc file no extension you can even see this has a Heroku little icon here and in this proc file we're gonna say web colon and we're using unicorn okay remember we install that back in the beginning and then app and then the file we want to run is our app file so that should run it so we'll save that ok another file we need to create is run time dot txt and we need to basically tell it what version of python to use so let's create a file called run time dot txt and we just simply need to say python - and then three point seven point two i believe and you can look this up let's see Heroku not python Heroku runtime dot txt should be a docking documentation file right here yeah so python 372 all we need to do this afterwards this requirements dot text all right so you know what I'll do is just delete my requirements text and just run that again except this time we want to do dot txt okay so now we have that you just want to make sure you have all these files before we attempt our deploy so now we'll do is add everything to our git repository so we'll say get at all just do it in one line so get a doll to our staging area and get commit dash M and for comment will just say initial deploy ok so now everything is in the local repository so now we need to push that to Heroku but in order to do that we need to add our remote repository so if we go to our application in our dashboard let's Alexis feedback and we go to deploy and you'll see a command like this Heroku get remote so we want to just grab that and just go ahead and paste that in so now that's added as our remote repository now we can push to it by just doing get push to Heroku and the master branch and hopefully that works and you can see it's installing Python 370 to installing pip so Heroku is I think is awesome because we don't have to do all this stuff ourselves on our remote production server when you use something like digitalocean or you know I don't know 'la note or vulture you have to do all this stuff on the server you know you have to set up you know engine acts and jewnicorn and it's just a pain in the ass Heroku makes this stuff much easier it also installs sqlite3 we're not using that but it does install it ok proc file declares so so far so good it's gonna look at our pipi envy file just like if you were to deploy a node app it would look at your package dot Jason and it would install all of your dependencies ok so it looks like everything's ok so now we can do Heroku open which will just open up the URL ok now this probably well it's not going to work because we haven't created the database table yet but we'll just give it a shot so if I say John Doe tests we're gonna get some internal error most likely yeah ok so it might have sent the email but I'm not sure I'll - see no it didn't let's just delete this old email here ok so the reason that that didn't work is because we don't have the table created so now let's go back into terminal here and do what we'll do what I did before Heroku run Python ok now we have our files deployed so we have that app dot PI file on the server so we can now do from app import DB and then DB dot create underscore all okay and then exit now I can actually log into my database my remote database from here as well so if I do karoku PG : p SQL - - app and then my name which is Lexus feedback I'm actually logged in to my remote database and I can do like select all from feedback and you can see I have 0 rows now let's try this again let's just reload this and let's say John Doe Karen Swanson will give her a 10 Karen is great and submit and we got redirected now I'm gonna go back to my oops and go back to my vs co-terminal and run that select all from feedback and there it is so we now have that data in our database on our server and we should have got the email let's check that out we'll go to mail trap there it is John Doe Karen Swanson so we now have a fully deployed app to Heroku a Python app a flask application that uses a database so hopefully you learn quite a bit in this in this little tutorial you know how to submit data how to deploy it how to send emails I mean it's a very simple little application but there's a lot that you can build from this one thing that I might suggest and I always suggest expanding on tutorials when you watch a tutorial or a course I would suggest that you implement authentication so that you can have a page where you log in and you see all the submissions and you should have a good foundation on how to do that you know just by what we've done here also I have a flask series where I show you how to use authentication or or implement authentication so I think taking that series in combination with this video I think that you could do that and that that'd be a really good challenge for you all right but hopefully you guys enjoyed this again I'll have the the code in the description I'll also try to create a little gist that you can follow as well for the commands and stuff all right thanks for watching if you like this please leave a like I appreciate it follow me on social media if you're interested and that's it thanks for watching
Info
Channel: Traversy Media
Views: 228,832
Rating: undefined out of 5
Keywords: python, python web app, python flask, python heroku, heroku, python postgres, postgresql
Id: w25ea_I89iM
Channel Id: undefined
Length: 53min 24sec (3204 seconds)
Published: Fri Aug 16 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.