Building Data-Driven Web Apps with Flask and SQLAlchemy Transcripts
Chapter: User input and HTML forms
Lecture: Registration form

Login or purchase this course to watch this video and the rest of the course contents.
0:00 The login and register out's in place. Let's go try to register. Well, there's not a whole lot going on over here that we can use yet is there?
0:09 Like our registration form is non existent. So let's go do the HTML side of things to add our registration form over in our template here.
0:18 Now we've got this little div action and actually that should be a form right there. Let's go ahead and put this on the inside
0:25 and then we have a couple of inputs. So we have an input type equals text and we're going to have an input type equals password.
0:34 We'll have another one of those. And then we'll also have a button and it'll say register. Okay let's see how that's coming along.
0:41 Yeah, that says okay. You know what goes in here? I don't, not yet. So let's go ahead and we could either add a label
0:48 but as you've probably already noticed from me I prefer placeholders, so we'll say your name this placeholder will be your email address
0:58 this placeholder will be your password. Now oftentimes on registration you'll see password and confirm password 'cause oh my gosh
1:07 what if you type in the password wrong and you can't login? In any real site, what you're going to have to do
1:11 no matter what, is have a reset your password option where you send them an email and they reset their password.
1:16 So if they get it wrong they can just do that alright. We don't have to actually double that up here.
1:21 And let's go and set the type on this to be submit How are we doing? Better, not amazing, but better. Can we submit our form? Let's go find out.
1:32 We click register, here you can see it's actually posting back. We do a get, it's posted here and then it's posting here when we submit it so
1:39 this runs when we request the page but this every time I click the button, it's running.


Talk Python's Mastodon Michael Kennedy's Mastodon