1
00:00:00,150 --> 00:00:01,680
Hello, friend, welcome back.

2
00:00:01,860 --> 00:00:05,800
In a previous video, we successfully updated our Chanes profile.

3
00:00:06,130 --> 00:00:11,760
And right now we can update our user name, email address, first name, last name, and then that is

4
00:00:12,000 --> 00:00:13,380
another one as a password.

5
00:00:13,770 --> 00:00:18,750
So for the password changes, they have the different like here right now in this video, I want to

6
00:00:18,750 --> 00:00:20,160
discuss about the things we do.

7
00:00:20,160 --> 00:00:21,720
How can change the password?

8
00:00:22,140 --> 00:00:25,250
So if you want to change the password, then have the three different class.

9
00:00:25,620 --> 00:00:30,840
If you go to Django, same official website and then the same pace.

10
00:00:30,840 --> 00:00:38,640
And with this here they have some of the class I show you for changing that password, like there is

11
00:00:38,640 --> 00:00:41,340
also the class as a said password form.

12
00:00:41,380 --> 00:00:44,940
So right now, to use some of this type of bomb, the class form.

13
00:00:44,940 --> 00:00:51,420
So it does if you use that same password form, it means a form that lets users change their password

14
00:00:51,420 --> 00:00:53,510
without entering all password.

15
00:00:53,970 --> 00:00:58,080
That means if you want to change that password, you don't need to put your password.

16
00:00:58,110 --> 00:01:02,030
So if you want to do the paperwork, then you can use it without this class.

17
00:01:02,040 --> 00:01:03,950
As I said, password class, OK?

18
00:01:04,170 --> 00:01:06,240
And also they have another one.

19
00:01:07,170 --> 00:01:09,920
They have another one as a password reset form.

20
00:01:10,200 --> 00:01:12,630
And with this password, this form if you use it.

21
00:01:12,630 --> 00:01:20,180
So this form is a form for generating and emailing a one time use liying to reset user password.

22
00:01:20,190 --> 00:01:25,320
So if you want to be working like that way, then you have to use this class as a password reset from

23
00:01:25,320 --> 00:01:29,090
class and also the other one as a password change form.

24
00:01:29,520 --> 00:01:36,480
So if you use that password change from then this class actually from four, allow the user to change

25
00:01:36,480 --> 00:01:37,290
their password.

26
00:01:37,410 --> 00:01:42,720
OK, so that is actually the one of the class or whatever the class you will choose right now and to

27
00:01:42,720 --> 00:01:45,990
do and to working with our this password change form.

28
00:01:46,450 --> 00:01:51,230
So if you want to work this form, first of all, we have to do we have to input this class.

29
00:01:51,240 --> 00:01:56,690
So that means, in our view, into The View page, first of all, right.

30
00:01:56,700 --> 00:01:57,570
Now we don't need this.

31
00:01:57,580 --> 00:02:01,140
I removed everything from here, OK?

32
00:02:05,430 --> 00:02:10,620
So maybe Moubayed, so that is our view that missing out at blogging and The View so into the video,

33
00:02:10,630 --> 00:02:15,660
first of all, here we have to do we have to import after that authenticate form here.

34
00:02:15,660 --> 00:02:18,870
We have to import this so that your passport changed from.

35
00:02:19,140 --> 00:02:19,440
Right.

36
00:02:19,690 --> 00:02:24,960
So, first of all, you have to import it so you don't have to do we have to create all of the function?

37
00:02:24,960 --> 00:02:27,030
And this will be just like that, SIM.

38
00:02:27,510 --> 00:02:34,260
And if you already will understand about that concept and then it's not be tough for you because of

39
00:02:34,260 --> 00:02:38,190
all here, I have to use everything as a default, all that functionalities.

40
00:02:38,490 --> 00:02:41,940
So like no one to do and to create another function for the change password.

41
00:02:42,420 --> 00:02:48,450
So here also, if you want to change that password, that means this user must have three login.

42
00:02:48,450 --> 00:02:50,160
That means the locking is declared.

43
00:02:50,430 --> 00:02:55,860
And then I take on the function name and I just name it as a password change or pass change.

44
00:02:57,600 --> 00:02:59,630
OK, the name ID as a fast change.

45
00:03:00,060 --> 00:03:02,940
And also here we have to pass that request.

46
00:03:02,940 --> 00:03:07,130
And then I want to do first of all for changing the password.

47
00:03:07,140 --> 00:03:08,850
This user already logged in.

48
00:03:08,850 --> 00:03:09,120
Right.

49
00:03:09,150 --> 00:03:11,570
So that means they have the current user we have to set.

50
00:03:11,820 --> 00:03:18,690
So I just take one of the variable as a current user, current user, it should be just the same as

51
00:03:18,690 --> 00:03:20,030
a requested user.

52
00:03:20,070 --> 00:03:22,590
That means our distinguished user right here.

53
00:03:22,590 --> 00:03:29,720
We have to set it and then we have to load our form and I load our form with our last name.

54
00:03:29,730 --> 00:03:33,230
I have already loaded our class as a password change class.

55
00:03:33,780 --> 00:03:39,720
So now with this class, we have to load our this form that is the default Django in the form for our

56
00:03:39,750 --> 00:03:40,550
password change.

57
00:03:40,610 --> 00:03:43,030
So now I take that things with this variable.

58
00:03:43,410 --> 00:03:45,740
So here we have to do we have to pass it.

59
00:03:46,110 --> 00:03:49,530
That means here I have already get our requested user.

60
00:03:49,530 --> 00:03:51,920
That will be our current user.

61
00:03:52,020 --> 00:03:55,920
I take the things with these variables here I simply perceived.

62
00:03:56,070 --> 00:03:56,430
Right.

63
00:03:56,670 --> 00:03:59,160
And then here we have to do we have to do the same thing.

64
00:03:59,170 --> 00:04:02,330
So we have to add one def condition for our post.

65
00:04:02,340 --> 00:04:05,100
That means that will be our form.

66
00:04:05,100 --> 00:04:05,340
Right.

67
00:04:05,350 --> 00:04:10,800
So which will be with our request and then method with the request method.

68
00:04:10,800 --> 00:04:14,160
First of all, this will be check that is forced or not.

69
00:04:15,300 --> 00:04:22,320
And then I want to do and to make our form, our form will be with our D password changes.

70
00:04:23,130 --> 00:04:31,290
So that will be our final form, our password, password change form and password change from here.

71
00:04:31,290 --> 00:04:32,280
We have to parse that.

72
00:04:32,280 --> 00:04:33,310
Our current user.

73
00:04:33,310 --> 00:04:33,640
Right.

74
00:04:33,660 --> 00:04:38,790
That will be our current user and then current user, our request data.

75
00:04:39,330 --> 00:04:43,950
So request and then our post site is simply added.

76
00:04:44,100 --> 00:04:46,130
And also this request post.

77
00:04:46,140 --> 00:04:52,240
That means when this user actually updated this password, this user already has some of the password.

78
00:04:52,250 --> 00:04:52,500
Right.

79
00:04:52,770 --> 00:04:56,220
So with this password, this user actually logged in for the here.

80
00:04:56,220 --> 00:04:59,400
I wanted to take out this user current data post that.

81
00:04:59,400 --> 00:05:01,990
I want to take it in particular.

82
00:05:01,990 --> 00:05:05,520
What the variable I just name it as a data, OK?

83
00:05:05,700 --> 00:05:07,970
I named it as a and data.

84
00:05:07,980 --> 00:05:14,220
And here I take that our this current user post data, I take it with this data variable.

85
00:05:14,220 --> 00:05:17,760
And after that I want to do I want to check it our form.

86
00:05:18,160 --> 00:05:20,300
That means I want to check our validate.

87
00:05:20,460 --> 00:05:28,140
So if our form is under is called valid, first of all it will be checked.

88
00:05:28,170 --> 00:05:32,790
So if it's valid then I want to do want to save this form, our form.

89
00:05:32,790 --> 00:05:34,100
I want to save it.

90
00:05:35,040 --> 00:05:35,700
OK, current.

91
00:05:35,940 --> 00:05:40,830
And after that I want to do and the load of the piece, that means in particular that area with the

92
00:05:40,830 --> 00:05:48,330
return and the render and the return, then there is this parameter, one is the request and that is

93
00:05:48,330 --> 00:05:49,730
the appropriate file location.

94
00:05:49,900 --> 00:05:59,100
So in our app, logging into the app, logging here, here, I want to create one of the new file and

95
00:05:59,100 --> 00:06:05,900
I just name it as a pass change fast and this could change, OK?

96
00:06:05,970 --> 00:06:08,590
I just name it as a change dot as HTML.

97
00:06:09,330 --> 00:06:12,930
So now we have to do we have to load it so better I just copy it.

98
00:06:13,860 --> 00:06:21,340
So in our view here it be logging, that means app logging and then I'll pass order the symbol that

99
00:06:21,600 --> 00:06:27,120
changed all this HTML and also after that I want to do and the password action data with the context.

100
00:06:27,780 --> 00:06:29,310
So that is our data.

101
00:06:29,310 --> 00:06:32,360
And additionally we have to do we have to pass out this form.

102
00:06:32,370 --> 00:06:32,740
Right.

103
00:06:32,760 --> 00:06:37,460
So now I want to learn to pass our key with the form and that will be our form.

104
00:06:37,800 --> 00:06:41,310
So now we can actually load our this form in our PA system.

105
00:06:41,310 --> 00:06:43,440
A lot in the past changed our estimate.

106
00:06:43,770 --> 00:06:44,120
Right.

107
00:06:44,490 --> 00:06:52,830
So now go to our past HTML and here it'll be just like our, um, that is our profile or whatever it

108
00:06:52,830 --> 00:06:53,820
will be like.

109
00:06:53,820 --> 00:06:55,650
I just take that logging better.

110
00:06:55,800 --> 00:07:00,960
I just copy everything from a logging e-mail, you know, pasturelands here I posted.

111
00:07:01,200 --> 00:07:04,830
So it will be also extended our basic HTML and lo.

112
00:07:05,030 --> 00:07:08,950
Our crispy form, then it will be as a password change.

113
00:07:13,940 --> 00:07:21,110
OK, so we have a password change space and I named it as a password change, which should be as a password

114
00:07:21,110 --> 00:07:21,490
change.

115
00:07:21,500 --> 00:07:23,010
And they have signed the form.

116
00:07:23,360 --> 00:07:26,780
So from here, I have also powers that as a form.

117
00:07:26,810 --> 00:07:33,560
So now we can actually use it with the form and the Crispi form and then it be as a of token and then

118
00:07:33,650 --> 00:07:36,140
of the bottom button for the change.

119
00:07:36,200 --> 00:07:40,500
OK, our password change whatever he wants right now, make that as a change.

120
00:07:41,330 --> 00:07:45,820
So that will be our password change.

121
00:07:46,010 --> 00:07:47,780
So that is our change form, right.

122
00:07:47,810 --> 00:07:48,330
Perfect.

123
00:07:48,650 --> 00:07:53,030
So now we have to do we have to create one that you are we have to create one of the wall for access

124
00:07:53,030 --> 00:07:54,340
our this password change.

125
00:07:54,360 --> 00:08:01,460
So that means in our app locking and that is all you are still here to do and to create a new one,

126
00:08:02,160 --> 00:08:06,230
new one of the pod and then just name it as a password.

127
00:08:08,590 --> 00:08:14,200
OK, just name it as a password, and in our view area, I have played a role and function or function

128
00:08:14,200 --> 00:08:15,540
name as a past change.

129
00:08:16,150 --> 00:08:21,680
So now I name it as a pass change and also a name that our part as a pasturelands.

130
00:08:22,230 --> 00:08:24,110
OK, so now let's check this out.

131
00:08:24,130 --> 00:08:30,940
Now, if you click as the save and now if you go to our site and here I'll refresh it.

132
00:08:32,090 --> 00:08:36,740
And now if you go to our this farm, that means this one, you can see this suffering of the account

133
00:08:36,740 --> 00:08:42,410
and the passport click here is perfectly redacted to our account password base.

134
00:08:42,770 --> 00:08:44,780
So there is our old password page.

135
00:08:44,780 --> 00:08:50,710
That is our new password and the new password confirmation that is our form is now successfully loaded.

136
00:08:50,720 --> 00:08:51,060
Right.

137
00:08:51,080 --> 00:08:58,940
So from here, we successfully loaded our interview area with our password transform into the password

138
00:08:58,940 --> 00:09:04,580
changed from everything that means our DVD or by default estimate, you can see the old password, a

139
00:09:04,590 --> 00:09:07,870
new password and our new confirmed password.

140
00:09:08,270 --> 00:09:13,790
And also here, if you want to do this type of work or NDR password will be updated, then to be sure

141
00:09:13,790 --> 00:09:18,020
some of the notification, then you can also do that work for doing this.

142
00:09:18,020 --> 00:09:19,100
We have to do we have to work.

143
00:09:19,100 --> 00:09:25,310
In our view, that means into the view and that is our password changes that we saw our function as

144
00:09:25,310 --> 00:09:27,710
a password change and in our current.

145
00:09:27,710 --> 00:09:33,980
And after that, first of all, I want to make I take one of the variable as a change, like a change

146
00:09:33,980 --> 00:09:36,830
and make that as a false so simple.

147
00:09:36,830 --> 00:09:37,490
Be just like that.

148
00:09:37,490 --> 00:09:40,100
Same before we have already added this type of work.

149
00:09:40,100 --> 00:09:43,960
And after that saved data, I wanted to make that as a true right.

150
00:09:44,420 --> 00:09:47,910
So here I wanted to make that as it should be, as a true.

151
00:09:49,460 --> 00:09:55,100
So when this data will be saved successfully, then it'll be a true and what it should be as a true.

152
00:09:55,100 --> 00:09:59,000
I don't want to make our password these changes that are in our context.

153
00:09:59,000 --> 00:10:01,280
That means here after that.

154
00:10:01,280 --> 00:10:06,020
After that I the do in the past that the change, I just simply pass that key.

155
00:10:06,140 --> 00:10:12,080
So right now we can actually use that our d change in our this space that upon our password change space

156
00:10:12,440 --> 00:10:14,820
to go to our passport in space here.

157
00:10:14,960 --> 00:10:20,120
So after this, I want to do I want to add on to the that means here.

158
00:10:20,120 --> 00:10:21,530
That is actually our blog.

159
00:10:21,530 --> 00:10:23,810
That means in our body block area we have to edit.

160
00:10:23,810 --> 00:10:24,080
Right.

161
00:10:24,320 --> 00:10:32,120
So in particular, that really I want to do under this condition one of the if condition, if our from

162
00:10:32,120 --> 00:10:34,230
here, I name it as a changed.

163
00:10:34,700 --> 00:10:40,610
So if this is a change, that means if this password is successfully updated, then it should be the

164
00:10:40,880 --> 00:10:49,760
one of the work I take on the Dave and I take on the alert, OK, alert plus alert alerts, success

165
00:10:50,810 --> 00:11:00,790
alert our success and here should be displayed on the text as a password since successfully so this

166
00:11:00,800 --> 00:11:03,110
type of one of the takes is still visible.

167
00:11:03,110 --> 00:11:06,050
And also we have to do we have to end this hour if condition.

168
00:11:06,800 --> 00:11:14,740
I just added as a and if perfect I hope friend you will understand about it because we did the same

169
00:11:14,870 --> 00:11:15,880
ten things before.

170
00:11:16,250 --> 00:11:19,820
So from here, first of all, I want to make that as an hour more.

171
00:11:19,820 --> 00:11:21,920
Take one of the variable and I just take that out.

172
00:11:21,920 --> 00:11:27,200
This current user, all the data, the false and later in this hour form is updated.

173
00:11:27,200 --> 00:11:31,920
I make that as a true and then I simply pass it in our contact space.

174
00:11:31,940 --> 00:11:33,100
That means in our dictionary.

175
00:11:33,320 --> 00:11:37,070
So now we can actually use it in our password, change space to enter the password.

176
00:11:37,080 --> 00:11:39,620
Genspace, I first of all, I put that condition.

177
00:11:39,620 --> 00:11:42,470
If it's charged, then it should be displayed this one.

178
00:11:42,470 --> 00:11:44,440
Right then I just put away.

179
00:11:44,450 --> 00:11:47,480
And if so, that means or else it should be displayed this portion.

180
00:11:47,660 --> 00:11:48,020
Right.

181
00:11:48,320 --> 00:11:50,730
So when it's updated then are still visible.

182
00:11:50,750 --> 00:11:51,860
Now, let's check this out.

183
00:11:51,860 --> 00:11:53,060
If you click, as I say.

184
00:11:53,070 --> 00:11:59,240
Well, first of all, I want to check it service perfectly running now.

185
00:11:59,300 --> 00:12:00,290
Refresh it again.

186
00:12:00,800 --> 00:12:04,790
So right now, I'm already using one of the password as you do me.

187
00:12:04,790 --> 00:12:05,890
One, two, three, four, five.

188
00:12:05,900 --> 00:12:06,130
Right.

189
00:12:06,140 --> 00:12:12,170
So now if you want to change it, like here we have to do we have to put your appropriate password.

190
00:12:12,410 --> 00:12:18,230
So here, if you put that in appropriate password and like here automatically you'll get that validation

191
00:12:19,040 --> 00:12:24,020
like this is not showing as your old password was entered is incorrect.

192
00:12:24,020 --> 00:12:24,410
Right?

193
00:12:24,590 --> 00:12:27,140
So here you don't need to add any validation.

194
00:12:27,380 --> 00:12:33,740
All the validation is really made in our this function area that this class area that is our password

195
00:12:33,740 --> 00:12:34,490
transformatory.

196
00:12:34,640 --> 00:12:37,100
So here we don't need to change anything.

197
00:12:37,460 --> 00:12:40,760
So no one did want to put our appropriate old password right now.

198
00:12:41,030 --> 00:12:42,620
That is our current password.

199
00:12:43,010 --> 00:12:44,000
So that is it.

200
00:12:44,000 --> 00:12:47,870
You do me one, two, three, four, five now and change it as you do me.

201
00:12:47,870 --> 00:12:49,490
One, two, three, four, five, six.

202
00:12:50,240 --> 00:12:53,060
As it you do me one, two, three, four, five, six.

203
00:12:53,380 --> 00:12:55,370
OK, so now the change is clear.

204
00:12:55,430 --> 00:12:56,000
The change.

205
00:12:56,840 --> 00:12:57,650
Yes.

206
00:12:57,650 --> 00:13:03,230
You can see for now successfully updated and also switching as a password change successfully.

207
00:13:03,650 --> 00:13:05,900
So now if you click on the log out.

208
00:13:06,140 --> 00:13:07,280
So that is all logging.

209
00:13:07,280 --> 00:13:12,600
So right now I'm logging with the test and a password you do me one, two, three, four, five.

210
00:13:12,620 --> 00:13:17,210
So now if you click as fighting is a logging now, this it's not showing is incorrect.

211
00:13:17,210 --> 00:13:19,250
So now I have updated or password.

212
00:13:19,250 --> 00:13:21,110
You give me one, two, three, four, five, six.

213
00:13:21,650 --> 00:13:22,910
Now click is a logging.

214
00:13:24,040 --> 00:13:29,260
Yeah, you can see now we can actually successfully locked in a coffin and also from here you can log

215
00:13:29,260 --> 00:13:32,500
out perfect, I hope is very much clear to you.

216
00:13:32,510 --> 00:13:35,440
So right now you can actually update your profile.

217
00:13:35,440 --> 00:13:37,170
You can update your password.

218
00:13:37,170 --> 00:13:37,460
Right.

219
00:13:37,840 --> 00:13:40,230
So there is six click as a logging.

220
00:13:40,690 --> 00:13:42,220
So that is our profile.

221
00:13:42,220 --> 00:13:46,720
And you can if you want to change that profile, details that in the profile info, you can change that

222
00:13:46,720 --> 00:13:47,470
profile info.

223
00:13:47,470 --> 00:13:52,080
If you want to change that password, that you can also change that password.

224
00:13:52,480 --> 00:13:52,840
Right.

225
00:13:53,140 --> 00:13:55,530
So now we can successfully do that work.

226
00:13:55,540 --> 00:13:56,740
I hope you enjoy it.

227
00:13:56,740 --> 00:13:58,090
Very much so, friend.

228
00:13:58,120 --> 00:13:59,800
I want to continue this process.

229
00:13:59,800 --> 00:14:00,730
You know, next video.

230
00:14:00,730 --> 00:14:07,600
I want to add one of the emails option for the profile that this user should have asked how the default

231
00:14:07,600 --> 00:14:12,550
picture and then when this user want to update that picture, how can update it?

232
00:14:12,820 --> 00:14:16,060
So step by step, I will show that things with a live example.

233
00:14:16,510 --> 00:14:18,160
So thanks for watching.

234
00:14:18,160 --> 00:14:20,050
I will see you in the next video.
