Building Data-Driven Web Apps with Pyramid 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 I don't know how you feel about it but this form doesn't seem super-useful to me. Let's go ahead and implement this really quickly.
0:06 We'll not do too much design but we'll just throw some quick stuff together here. So the other thing we need here is the method
0:13 to be POST, and then we need a couple of things in here. So let's have an input, the type is text placeholder is going to be your email address.
0:26 And it also needs a name and I'll put that right at the beginning. This tells the browser what to call the value
0:33 and gives us a name to retrieve the value by. So this will be email. And this will be password. And let's do also a name, name name.
0:47 So your name, your email address, and password. And on this one of course we'll want the type also to be password.
0:56 Now a lot of forms have password and confirm password. I'm not a big fan of that because if long as you add the ability to reset your password
1:04 if for some reason in that super-odd case that you actually register and then immediately forget your password or more likely screw up the password
1:11 just go reset it. That's the way I would do it. I would not have a confirm but that's, you know, whatever makes sense for you.
1:16 And then of course you want to have a button and the type is going to be submit. And the value is going to be register. Let's see where we are.
1:24 That looks amazing, doesn't it? What do you think, just leave it like this? Probably not, maybe we need a really quick bit of design.

Talk Python's Mastodon Michael Kennedy's Mastodon