1
00:00:05,270 --> 00:00:06,600
Welcome back everyone.

2
00:00:06,620 --> 00:00:11,870
We're going to continue working on this main users component by starting to build out the views we had

3
00:00:11,870 --> 00:00:15,920
to fill out the forms first because we're going to be using those forms when constructing our views

4
00:00:16,250 --> 00:00:19,640
then once we have a review set up we can begin connecting them to templates.

5
00:00:19,640 --> 00:00:20,960
Let's get started.

6
00:00:20,960 --> 00:00:21,190
All right.

7
00:00:21,190 --> 00:00:23,930
Here we are we're back at our actual text Ed..

8
00:00:23,990 --> 00:00:29,810
Recall that last time we filled out the log in form the registration form and the up that user form

9
00:00:30,140 --> 00:00:35,210
as well as the special picture handler which were going to be using in our views.

10
00:00:35,240 --> 00:00:42,410
So let's go over two views up high and as a reminder this is our users views up-I.

11
00:00:42,690 --> 00:00:45,440
And let's kind of sketch out what we need to do here.

12
00:00:45,560 --> 00:00:51,820
We need to create some views one to actually register a a user and other one to actually log in the

13
00:00:51,820 --> 00:00:52,760
user.

14
00:00:52,850 --> 00:00:57,960
Then we're also going to want you to log out a user to type out log out.

15
00:00:58,240 --> 00:01:02,240
And then we're going to want a view to actually show someone's account.

16
00:01:02,260 --> 00:01:08,610
This is essentially going to refer to the update user forum and then we also want you to show all of

17
00:01:08,610 --> 00:01:10,210
a user's blog posts.

18
00:01:10,210 --> 00:01:15,470
So this will be something like a user's list of blog posts.

19
00:01:15,470 --> 00:01:15,690
All right.

20
00:01:15,700 --> 00:01:19,960
So these are the views we're going to create and we're going to have to actually import quite a bit

21
00:01:20,050 --> 00:01:22,210
in order to make sure this all works out.

22
00:01:22,210 --> 00:01:28,570
So to start with the basic imports from flask will say from flask import and we're going to be using

23
00:01:28,570 --> 00:01:33,790
render a template your for we may want to flash some messages.

24
00:01:33,790 --> 00:01:35,410
We'll go ahead and import that.

25
00:01:35,410 --> 00:01:41,380
We may want to do some redirects after they blog then and then we'll also import request and blueprint

26
00:01:41,440 --> 00:01:46,980
because we're going to want to set users as a blueprint to register it in our in that pie file.

27
00:01:47,200 --> 00:01:48,460
So that's ready to go.

28
00:01:48,730 --> 00:01:52,630
And now we're also going to be using flask loggin for a lot of this functionality.

29
00:01:53,110 --> 00:01:59,650
So we'll say from flask loggin import and we're going to want to be able to log in the user grab the

30
00:01:59,650 --> 00:02:05,540
current user log out a user so log out user and then say log in required

31
00:02:08,260 --> 00:02:09,350
it's actually just typing that.

32
00:02:09,350 --> 00:02:09,820
There we go.

33
00:02:11,030 --> 00:02:15,680
Now we're also going to need to reference our database because remember if we're actually registering

34
00:02:15,680 --> 00:02:20,580
a user will have to connect to the actual database and update it or create it.

35
00:02:21,080 --> 00:02:24,980
So I'll say from puppy company blog import DB.

36
00:02:25,220 --> 00:02:31,550
So that actually is saying go to this in it thought py file come down and grab this application sequel

37
00:02:31,550 --> 00:02:33,440
alchemy object.

38
00:02:33,440 --> 00:02:35,080
So that's that D-B right there.

39
00:02:37,210 --> 00:02:39,960
Then I will say from puppie company blog.

40
00:02:40,220 --> 00:02:42,010
Let's go ahead and import the models.

41
00:02:42,020 --> 00:02:48,920
We'll import the user model as well as the blog post model then we'll say from puppie company blog dot

42
00:02:48,920 --> 00:02:57,920
users forms import registration form the log in form and the update user forms the forms are created

43
00:02:57,920 --> 00:02:59,300
in the last lecture.

44
00:02:59,750 --> 00:03:09,340
And then finally we're going to say from puppy company blog dot users dot picture handler import ad

45
00:03:09,340 --> 00:03:10,600
profile pic.

46
00:03:10,600 --> 00:03:16,450
So this is just saying open up this picture handler that PI file and then grab this function because

47
00:03:16,450 --> 00:03:18,800
I want to be able to pass in the picture upload.

48
00:03:18,940 --> 00:03:23,560
So that's the actual file upload that someone gives in the update user form and then we want to grab

49
00:03:23,560 --> 00:03:29,930
their current username and then save that particular file as a user name that a peg or dot PMG.

50
00:03:30,460 --> 00:03:30,920
OK.

51
00:03:31,120 --> 00:03:35,550
So those are all the imports we need I'm going to collapse this left hand tab there.

52
00:03:36,100 --> 00:03:40,410
Let's save that and then let's begin on the major components here.

53
00:03:40,420 --> 00:03:43,480
First thing I want to do right off the bat is register this as a blueprint.

54
00:03:43,570 --> 00:03:51,540
So will say users is equal to blueprints and we'll register it as users and then pass the built in name

55
00:03:51,540 --> 00:03:52,680
variable.

56
00:03:52,680 --> 00:03:57,260
And since we're doing that we might as well register this over in our in it that PI file.

57
00:03:57,270 --> 00:04:03,000
So we to come over back to this in that pie and over here at the bottom.

58
00:04:03,020 --> 00:04:07,960
We're going to for organizations sake keep all my blueprint registrations here.

59
00:04:08,070 --> 00:04:20,990
So we're going to do is say from puppy company blog dot users views import users because remember that's

60
00:04:21,000 --> 00:04:23,740
the actual that come back to views that's users right here.

61
00:04:23,760 --> 00:04:25,000
That's a blueprint object.

62
00:04:25,170 --> 00:04:33,430
So then we'll just say take the app and register my blueprint of users.

63
00:04:33,430 --> 00:04:33,970
OK.

64
00:04:34,150 --> 00:04:35,780
That way we don't forget to do that.

65
00:04:36,220 --> 00:04:39,600
So we'll come back to use we have that blueprint registered ready to go.

66
00:04:39,610 --> 00:04:41,590
Now we just need to set up our views.

67
00:04:41,590 --> 00:04:45,450
And later on will set up the actual templates that connect to all of these.

68
00:04:45,460 --> 00:04:47,460
So let's start off with some of the simpler ones.

69
00:04:47,470 --> 00:04:51,610
I think the simplest one to start off with is actually the log out you said essentially we don't really

70
00:04:51,610 --> 00:04:53,920
need to do anything special for that.

71
00:04:53,920 --> 00:05:01,390
So for logging out oh we're going to say is we'll see users that routes and we're going to route this

72
00:05:01,390 --> 00:05:08,050
to log out and we'll say the F log.

73
00:05:08,860 --> 00:05:15,520
And then essentially we just call the builtin log out user so that's the logout user function that we

74
00:05:15,520 --> 00:05:17,170
imported from flask log in.

75
00:05:17,170 --> 00:05:22,840
Remember we've used this before in the user authentication authorization section of the course.

76
00:05:23,170 --> 00:05:25,920
And then once the user is locked out let's just redirect them to the home page.

77
00:05:25,930 --> 00:05:31,710
So we're going to say return a redirects and we'll call your all four.

78
00:05:31,780 --> 00:05:35,460
And remember we can't just say index because we're using a blueprint.

79
00:05:35,560 --> 00:05:38,210
So we need to say core that index.

80
00:05:38,230 --> 00:05:43,180
So that means once a user has logged out we will call the function to log out that user and then redirect

81
00:05:43,180 --> 00:05:44,740
them back home.

82
00:05:44,740 --> 00:05:45,170
All right.

83
00:05:45,430 --> 00:05:47,760
So that's probably the simplest view we have.

84
00:05:47,760 --> 00:05:51,640
Now let's focus on some of the more basic or main ones I should say.

85
00:05:52,580 --> 00:05:57,350
Right off the bat we should probably take care of registering a new user since that's pretty fundamental

86
00:05:57,350 --> 00:05:59,040
to setting up our views.

87
00:05:59,060 --> 00:06:05,940
So we'll say that users route and we'll route this to a page called register.

88
00:06:06,180 --> 00:06:09,510
And then since we're going to be using a form here we're going to want to make sure that we set the

89
00:06:09,510 --> 00:06:16,290
methods so we'll say passing a list here of get and post.

90
00:06:16,510 --> 00:06:19,680
And this is essentially going to connect to that registration form.

91
00:06:19,810 --> 00:06:26,050
So we're going to say here is create the register function will create an instance of that registration

92
00:06:26,050 --> 00:06:28,150
form that we created in the last lecture.

93
00:06:29,310 --> 00:06:34,510
And then we'll do our basic check here will say if that form validate on submit.

94
00:06:34,600 --> 00:06:36,220
So once they hit submit if it's valid.

95
00:06:36,250 --> 00:06:39,960
Well we're going to do is create a user object.

96
00:06:39,960 --> 00:06:52,140
So say the user e-mail is equal to form that e-mail that data the username is equal to form the user

97
00:06:52,150 --> 00:06:56,440
name that data and then a password.

98
00:06:56,440 --> 00:07:02,270
Same thing grab the password off of that form what's not passed confirm password.

99
00:07:02,470 --> 00:07:05,540
Actually technically it doesn't matter but probably just grab the first one.

100
00:07:05,570 --> 00:07:07,220
True it's a single equal sign.

101
00:07:07,420 --> 00:07:10,950
And then we've created this user object.

102
00:07:11,110 --> 00:07:11,360
All right.

103
00:07:11,360 --> 00:07:16,520
So if that worked then we have that users new registration of the email the username and the password

104
00:07:16,820 --> 00:07:22,130
and remember the form itself is going to check whether or not that e-mail or that user name has already

105
00:07:22,130 --> 00:07:23,090
been taken.

106
00:07:23,090 --> 00:07:29,360
So once we do that we're going to grab our database grab the section of it and then add in that user

107
00:07:30,230 --> 00:07:32,090
they're going to commit those changes.

108
00:07:32,120 --> 00:07:38,480
So say D-B session commits and then we're going to do is redirect them to the logon page.

109
00:07:38,480 --> 00:07:41,290
So once they've registered they can then say log in.

110
00:07:41,540 --> 00:07:46,400
Now sometimes what people like to do is upon registration they will flash a message saying something

111
00:07:46,400 --> 00:07:57,540
like Thanks for registering so we could do something like this a flash thinks for registration registration.

112
00:07:57,630 --> 00:08:02,910
So if you want you could flash this and then not actually redirect just keep rendering that same registration

113
00:08:02,910 --> 00:08:03,630
page.

114
00:08:03,630 --> 00:08:09,630
But often what you're going to want to do is just return to some sort of logon page so we can say redirect

115
00:08:10,500 --> 00:08:14,230
your all for and then say users log in.

116
00:08:14,400 --> 00:08:18,610
And if you do it this way most likely that's going to happen is this going to flash for like one second

117
00:08:18,610 --> 00:08:22,500
and you're actually going to be fast enough you to catch it before the redirect.

118
00:08:22,530 --> 00:08:26,440
So it's up to you how you want to use this flash versus the redirect.

119
00:08:26,530 --> 00:08:30,530
We'll we'll show them both here that way you can understand where it would actually go for the flash

120
00:08:30,540 --> 00:08:34,980
but what's going to happen is once that person registers and everything's valid it's going to be like

121
00:08:34,980 --> 00:08:35,980
a millisecond flash.

122
00:08:36,000 --> 00:08:37,110
Thanks for registration.

123
00:08:37,140 --> 00:08:38,490
Probably too quick free to catch it.

124
00:08:38,610 --> 00:08:41,150
And then it's going to redirect to the log in page.

125
00:08:41,160 --> 00:08:45,550
Now that's it the form is valid on submissions and noticed my in the station here.

126
00:08:45,740 --> 00:08:49,760
What I want to do is actually have a view for the registration page.

127
00:08:49,760 --> 00:08:56,830
So that means I'm going to need to return render a template and will have register H.T. mail as my template

128
00:08:57,630 --> 00:09:00,510
where the form passed in the form.

129
00:09:00,590 --> 00:09:02,810
So go ahead and save that again.

130
00:09:02,810 --> 00:09:05,960
Pay close attention here to the indentation on our returns.

131
00:09:05,960 --> 00:09:12,320
When we first route someone to the registration page it's going to say return register that time L it's

132
00:09:12,320 --> 00:09:17,590
only upon submitting that form that we get to redirect them to users that log in.

133
00:09:17,600 --> 00:09:18,130
All right.

134
00:09:18,260 --> 00:09:20,870
So since we actually called this register that each team l.

135
00:09:21,020 --> 00:09:25,130
Let's go ahead and fill in that template since it's actually pretty straightforward.

136
00:09:25,130 --> 00:09:28,640
This is one of the simpler templates that we're going to be working with here.

137
00:09:28,730 --> 00:09:35,180
So I've already called that register that it's T.M. which means I will save those changes come back

138
00:09:35,180 --> 00:09:43,300
to my templates and I'm going to create a new file here and call register thought HTL.

139
00:09:43,600 --> 00:09:44,150
OK.

140
00:09:44,420 --> 00:09:51,160
And then I'm going to do a lot of the same stuff as we've done before extend from my base HVM El call

141
00:09:51,160 --> 00:09:57,150
my block and then say content here and essentially all this is going to be just a form to register.

142
00:09:57,340 --> 00:10:03,740
So a form and we actually don't need to worry about class or action that's being take care of us or

143
00:10:03,740 --> 00:10:06,190
taking care for us by flask.

144
00:10:06,200 --> 00:10:10,700
We'll just say that the method is post and sometimes you'll get an error if you don't put it in all

145
00:10:10,700 --> 00:10:15,140
caps that that shouldn't be an issue but just in case I like to always put it in all caps it also makes

146
00:10:15,140 --> 00:10:16,940
it a little more readable for me.

147
00:10:16,940 --> 00:10:23,910
And then we're going to say I'm going to pass in the form hidden tags to make sure we can actually accept

148
00:10:23,910 --> 00:10:29,840
this and then we just need the labels and their actual form components.

149
00:10:30,610 --> 00:10:35,560
So if we think about what form we're passing into the register that H team l remember we come back to

150
00:10:35,560 --> 00:10:37,780
use the form we're passing in here.

151
00:10:37,800 --> 00:10:42,170
So form is equal to form to register that it's him l that's the registration form here.

152
00:10:42,220 --> 00:10:48,100
And if we take a look back at the users forms we're basically passing in an email username password

153
00:10:48,300 --> 00:10:49,050
Pasch confirm.

154
00:10:49,090 --> 00:10:50,280
And the submit button.

155
00:10:50,320 --> 00:10:57,130
So all we need do is pass all of these through the views right here and form on line 26 and then set

156
00:10:57,130 --> 00:10:59,340
them up here and this register that each team out.

157
00:10:59,590 --> 00:11:04,450
So we've set up our hidden tag and then we're going to say here is essentially the following form the

158
00:11:04,450 --> 00:11:09,890
e-mail label and then form the e-mail.

159
00:11:10,390 --> 00:11:13,460
And just so it looks a little nicer and add in a break here.

160
00:11:13,480 --> 00:11:13,940
OK.

161
00:11:14,140 --> 00:11:17,210
So when you do this for every field in that form.

162
00:11:17,320 --> 00:11:18,610
So we have e-mail.

163
00:11:18,640 --> 00:11:23,700
We'll also have username password and past confirm.

164
00:11:23,860 --> 00:11:27,890
And then at the end of this we'll say form submit.

165
00:11:27,890 --> 00:11:29,360
So right now I just copy and paste these.

166
00:11:29,360 --> 00:11:32,300
But let's go ahead and replace these of what we actually want.

167
00:11:32,300 --> 00:11:37,630
We're going to want a user name after the e-mail upon registration.

168
00:11:37,630 --> 00:11:40,880
We're going to want them to provide a password.

169
00:11:40,990 --> 00:11:49,110
So again password here and then we'll also want them to provide a pass confirm.

170
00:11:49,110 --> 00:11:54,060
So say password confirm as well as pass confirm here.

171
00:11:54,060 --> 00:11:57,880
Now keep in mind this is going to be kind of a really simple looking form.

172
00:11:58,050 --> 00:12:03,330
You can always add in your own CSSA calls over here on the form Remember we showed you how to do that.

173
00:12:03,360 --> 00:12:08,130
All you do is open close Princie here and then say class is equal to something.

174
00:12:08,370 --> 00:12:12,340
And often what you want to do is use the bootstrap classes for forms.

175
00:12:12,340 --> 00:12:17,290
So let me just bring in the bootstrap documentation so you can see what I'm talking about.

176
00:12:17,400 --> 00:12:23,700
If you take a look at bootstrap right here remember that if you go to components and then come down

177
00:12:23,700 --> 00:12:29,160
to forms these bootstrap forms look super nice and they have their own classes you can call.

178
00:12:29,190 --> 00:12:35,400
You can set up things like a div form group form control form text text muted and that makes us all

179
00:12:35,400 --> 00:12:37,920
look really nice and good for simplicity.

180
00:12:37,920 --> 00:12:41,450
We're not going to add in that much of these bootstrap classes here for forms.

181
00:12:41,460 --> 00:12:46,140
But I want you to know that it's definitely an option for you to make your forms and pages look really

182
00:12:46,140 --> 00:12:47,370
nice with bootstrap.

183
00:12:47,550 --> 00:12:52,080
For now we're just keeping it simple essentially doing what we've done before passing everything here

184
00:12:52,410 --> 00:12:54,360
as a normal flask form.

185
00:12:54,390 --> 00:12:54,950
OK.

186
00:12:55,020 --> 00:12:57,290
So that's a registration page ready to go.

187
00:12:57,510 --> 00:13:00,060
So we have our views right here for registration.

188
00:13:00,060 --> 00:13:01,160
Perfect.

189
00:13:01,230 --> 00:13:06,930
Nelse move on to the log in view very similar thing we're going to do here.

190
00:13:06,940 --> 00:13:09,490
We'll say users not route.

191
00:13:09,970 --> 00:13:13,240
And then this will go to a page called logon.

192
00:13:13,250 --> 00:13:15,280
Same thing here repassing in a form.

193
00:13:15,290 --> 00:13:18,570
So will say methods is equal to gets.

194
00:13:18,620 --> 00:13:28,570
And then also post ups and then we'll say the F log in we're going to create an instance of the form.

195
00:13:28,580 --> 00:13:32,290
In this case it's going to be the log and form that we created in the last lecture.

196
00:13:32,480 --> 00:13:39,670
And very similar We're going to say if the form validate on submit then what we're going to do is remember

197
00:13:39,730 --> 00:13:41,860
they're logging in so they already exist.

198
00:13:41,890 --> 00:13:47,770
Which basically means instead of creating a user like I did up here here I created a user upon registration

199
00:13:47,830 --> 00:13:48,890
added them in.

200
00:13:49,330 --> 00:13:52,500
Now that I'm logging in I just want to query that user that already exist.

201
00:13:52,540 --> 00:14:01,630
So I'll say user is equal to user and I'm going to ask for a query and then filter by where email is

202
00:14:01,630 --> 00:14:08,260
equal to form the e-mail that data because upon logging and they provide an email address so I get a

203
00:14:08,260 --> 00:14:13,630
filter by that e-mail I remember upon registration we wanted to make sure every email is unique which

204
00:14:13,630 --> 00:14:18,790
is why I can just filter by a single e-mail and then I'm going to grab the first user that shows up.

205
00:14:18,790 --> 00:14:23,170
There should only be one user but the reason I call first here is just so I get it in the right format

206
00:14:23,230 --> 00:14:26,270
instead of getting a list or an array of results.

207
00:14:26,650 --> 00:14:27,300
OK.

208
00:14:27,610 --> 00:14:29,470
So there's my user they just logged in.

209
00:14:29,470 --> 00:14:32,380
Now what I want to do is make sure that they provided the correct password.

210
00:14:32,380 --> 00:14:36,060
So if the user exists I'm going to say is falling.

211
00:14:36,520 --> 00:14:47,770
I'll say if user dot check password and then we'll call form the password data.

212
00:14:47,880 --> 00:14:53,790
So assuming they provided the correct password remember the user has that versus a security check.

213
00:14:53,790 --> 00:14:56,540
And I'll say an user is not.

214
00:14:56,800 --> 00:14:59,400
None that I'm ready to log in the user.

215
00:14:59,460 --> 00:15:02,840
And luckily flask log in can do all of this heavy lifting for us.

216
00:15:02,850 --> 00:15:09,090
All we need to say is say logging user and then just pass in the user object.

217
00:15:09,320 --> 00:15:16,150
And then we can flash something like log in success.

218
00:15:16,280 --> 00:15:22,210
Now often a user is going to be wanting to search for something and then they're prompted to log in.

219
00:15:22,400 --> 00:15:26,550
So what you can do is create this next object as we've previously discussed.

220
00:15:26,570 --> 00:15:33,170
So if a user was trying to visit a page that required a log in what happens is we can say request args

221
00:15:33,620 --> 00:15:35,970
gets next.

222
00:15:36,030 --> 00:15:41,250
And what this does is it basically from that current session it grabs the information of what the user

223
00:15:41,250 --> 00:15:44,520
was actually trying to access.

224
00:15:44,540 --> 00:15:56,600
So then we'll do the following will say if next is equal to one or not next 0 equal to 4 slash.

225
00:15:56,640 --> 00:16:05,980
It's home page we'll say that next is equal to your L4 core index.

226
00:16:06,150 --> 00:16:15,650
And then we're just going to redirect them will say return redirect to next and then here will say return

227
00:16:16,730 --> 00:16:19,950
render template log in.

228
00:16:20,020 --> 00:16:25,510
H tim L and then passen that form OK.

229
00:16:25,550 --> 00:16:28,370
Let's quickly review what we actually just did here.

230
00:16:28,540 --> 00:16:30,640
In this view file.

231
00:16:30,640 --> 00:16:32,830
So here we're routing them to log in.

232
00:16:33,010 --> 00:16:36,930
We create that log in a form if the form is valid on submission.

233
00:16:37,000 --> 00:16:40,050
Then we grab that user by their e-mail address.

234
00:16:40,090 --> 00:16:44,640
We check to make sure they provided the correct password and that the user actually exists.

235
00:16:45,070 --> 00:16:47,430
Then we log in the user happens to be true.

236
00:16:47,740 --> 00:16:50,270
And then this next line line 44 here.

237
00:16:50,470 --> 00:16:55,530
All that says is hey it was easier trying to reach in other web page that had a required log in.

238
00:16:55,720 --> 00:16:58,180
If so go ahead and grab that.

239
00:16:58,180 --> 00:17:03,250
Now this case if next was done they actually just went straight to the logon page or if next wasn't

240
00:17:03,250 --> 00:17:04,420
equal to the home page.

241
00:17:04,480 --> 00:17:09,040
Go ahead and just set next equal to the home page and then redirect them to next.

242
00:17:09,100 --> 00:17:14,330
Which means basically they're either going to go back to the home page or go to the web page that they're

243
00:17:14,350 --> 00:17:15,510
actually trying to view.

244
00:17:15,820 --> 00:17:17,570
And then this return render template.

245
00:17:17,710 --> 00:17:20,520
Well that's actually just a return for this entire logon.

246
00:17:20,710 --> 00:17:23,710
So let me make sure that I actually have my in the station correct there.

247
00:17:23,860 --> 00:17:25,400
That's really important to get it right.

248
00:17:25,450 --> 00:17:27,940
So I want that one more space back here.

249
00:17:27,940 --> 00:17:31,550
One more step back so that it's actually the return for this logon.

250
00:17:31,570 --> 00:17:39,340
So keep special mind here of the indentation for this return versus this return this return of the redirect

251
00:17:39,640 --> 00:17:42,970
you want to make sure that's connected to right here.

252
00:17:42,970 --> 00:17:47,560
This underneath this if statement this return for the rather template you want to make sure that's connected

253
00:17:47,560 --> 00:17:51,220
to this log in the form.

254
00:17:51,350 --> 00:17:56,490
And now that that's done let's go ahead and very quickly create that log in the HTL template.

255
00:17:56,570 --> 00:18:02,000
So we'll open this up go back to templates create a new file call it in.

256
00:18:02,030 --> 00:18:07,340
H tim L and it's going to look really really similar to the register that each T.M. so similar in fact

257
00:18:07,340 --> 00:18:14,480
that I can actually copy from register at each time L and then pass it in here to logon and it's going

258
00:18:14,480 --> 00:18:15,310
to have a hidden tag.

259
00:18:15,320 --> 00:18:19,220
Then I have an e-mail but there's actually no user name provided here.

260
00:18:20,050 --> 00:18:22,120
And there's no Pask confirm here.

261
00:18:22,120 --> 00:18:26,380
Basically it's just logging in with your e-mail and your password and that's it.

262
00:18:26,650 --> 00:18:27,180
OK.

263
00:18:27,280 --> 00:18:29,660
So that's what the log in him looks like.

264
00:18:29,710 --> 00:18:36,020
And remember back in our views we're passing in this form object to log in each T.M..

265
00:18:36,100 --> 00:18:36,670
All right.

266
00:18:36,670 --> 00:18:40,720
So we've set up the registration and log interviews for our users.

267
00:18:40,720 --> 00:18:45,820
Up next we're going to have to do is finish this off by setting up their account view as well as a user's

268
00:18:45,820 --> 00:18:47,290
list of blog posts.

269
00:18:47,290 --> 00:18:49,360
We'll continue that discussion in the very next lecture.
