1
00:00:00,180 --> 00:00:01,740
Hello, friend, welcome back.

2
00:00:02,130 --> 00:00:07,950
In a previous video, we successfully complete our legal position, so right now I want to do I have

3
00:00:07,950 --> 00:00:11,130
already complete our station locking and the logout.

4
00:00:11,460 --> 00:00:13,200
So here I want to define this step up.

5
00:00:13,200 --> 00:00:19,160
One of the main condition when this user will be locked in the in our D register and the locking button

6
00:00:19,160 --> 00:00:20,190
not should be visible.

7
00:00:20,400 --> 00:00:25,400
And when this user will be locked out, then our D register and the locking will be visible.

8
00:00:25,410 --> 00:00:27,490
So that is the condition we have to set.

9
00:00:27,510 --> 00:00:30,370
So here we have to define some of the condition in our menu area.

10
00:00:30,690 --> 00:00:33,630
So there is the menu I have defined in our base system.

11
00:00:33,630 --> 00:00:33,970
All right.

12
00:00:34,350 --> 00:00:40,020
So now go to our business HTML security, pretty easy things like here into the basic HTML.

13
00:00:40,020 --> 00:00:45,660
I have defined all the terminal so no one to do and to actually our take this all log out.

14
00:00:45,660 --> 00:00:47,100
I will after this locking.

15
00:00:47,100 --> 00:00:49,050
I want to define this, all this log out.

16
00:00:49,050 --> 00:00:51,810
OK, that means that the cloud logger portions.

17
00:00:51,810 --> 00:00:57,140
So now here I want to define the condition so I just simply define the if condition.

18
00:00:57,360 --> 00:01:05,430
So here with these percentages I defined the if condition, if our user, that means this user and also

19
00:01:05,430 --> 00:01:08,270
they have another function as it is authenticated.

20
00:01:08,550 --> 00:01:13,140
So with this we can actually defining each side as simply defined as ease, underscore, authenticated

21
00:01:15,330 --> 00:01:15,960
the ID.

22
00:01:16,050 --> 00:01:17,500
So that is not indicated.

23
00:01:17,640 --> 00:01:24,300
So if this user is authenticated that this user is logging, then I only want to display our home and

24
00:01:24,300 --> 00:01:29,250
the log button, OK, and else it shall be display our register and the logging.

25
00:01:29,610 --> 00:01:32,130
So now I want to do and to define another Ayles.

26
00:01:32,880 --> 00:01:36,600
So I just simply defined that ale's right.

27
00:01:36,600 --> 00:01:39,630
So Ilse's will be displayed our display of this position.

28
00:01:39,630 --> 00:01:42,300
And then here after this, I have to do have to finish it.

29
00:01:42,870 --> 00:01:44,290
That means I have to finish our.

30
00:01:44,340 --> 00:01:47,940
And if condition and just simply and our condition.

31
00:01:48,220 --> 00:01:50,420
OK, so that's all you have to do.

32
00:01:50,430 --> 00:01:51,450
Now let's check this out.

33
00:01:51,480 --> 00:01:53,640
Everything will be due by this hour.

34
00:01:53,640 --> 00:01:55,920
A function that is authenticated function.

35
00:01:56,460 --> 00:02:01,170
Now, if you click the save all and now if you refresh it.

36
00:02:01,800 --> 00:02:02,400
Yes.

37
00:02:02,400 --> 00:02:04,650
Now you can see right now I'm not logged in.

38
00:02:04,920 --> 00:02:08,580
So for the results, our home and our logo is not visible.

39
00:02:08,610 --> 00:02:11,270
You can see right now I am not logging for the reasons.

40
00:02:11,290 --> 00:02:12,740
First of all, it's subjective.

41
00:02:12,960 --> 00:02:16,540
And when this is shaky, this user is not logging by default.

42
00:02:16,540 --> 00:02:17,730
They have else option.

43
00:02:17,910 --> 00:02:20,810
Our this register and the logging button is now visible.

44
00:02:21,030 --> 00:02:22,830
And when you logged in, then our.

45
00:02:22,830 --> 00:02:28,370
That means when this user is authenticated and then our home button and the log button only visible.

46
00:02:28,420 --> 00:02:38,310
Now let's check this out here right now in the logging, I just put the Karzai and the password and

47
00:02:38,310 --> 00:02:39,520
then click as login.

48
00:02:40,500 --> 00:02:46,440
Yes, you can see friend after that logging now showing our home and the log out, specifically the

49
00:02:46,440 --> 00:02:47,160
log out.

50
00:02:47,520 --> 00:02:50,890
And then you can see snowshoeing at the register and logging button.

51
00:02:51,360 --> 00:02:54,900
So now here I want to do when this user will be locked in.

52
00:02:54,910 --> 00:03:01,020
That means here if you pulled appropriate user name and also if this proposed appropriate password and

53
00:03:01,020 --> 00:03:01,960
if it is a logging.

54
00:03:02,370 --> 00:03:04,490
So here you can see snowshoeing showing our home page.

55
00:03:04,500 --> 00:03:09,600
So into this home page, I want to do I want to display appropriate this user all the details that mean

56
00:03:09,640 --> 00:03:11,940
this user user name email.

57
00:03:12,030 --> 00:03:14,490
That is the URL and also the picture here.

58
00:03:14,490 --> 00:03:20,820
I want to display it because of all when we register it, we register by the user name, email the password

59
00:03:20,820 --> 00:03:23,050
and also the emails and the Facebook idea.

60
00:03:23,070 --> 00:03:23,340
Right.

61
00:03:23,760 --> 00:03:29,220
So no one to do this will display all that information, in particular that area after this logging.

62
00:03:29,610 --> 00:03:34,430
So here also we have to do have to define that things by a specific user ID data.

63
00:03:34,440 --> 00:03:34,770
Right.

64
00:03:34,920 --> 00:03:38,910
Because when you logging with the Karzai, then we display all that Karzai details.

65
00:03:38,910 --> 00:03:41,160
That means Karzai details will be visible.

66
00:03:41,160 --> 00:03:46,670
When you logging with the Ardian, then it will be displayed all the darrian related all the data.

67
00:03:47,100 --> 00:03:49,020
So how can do that work for doing this?

68
00:03:49,020 --> 00:03:52,850
We have to do we have to work in our index because of all that is our index function.

69
00:03:53,310 --> 00:03:57,240
So now go to our view and into the view area.

70
00:03:57,240 --> 00:04:03,600
That is our index function so that the index function right into the index function area we have to

71
00:04:03,600 --> 00:04:03,900
work.

72
00:04:03,910 --> 00:04:05,610
So here we have to define that.

73
00:04:05,610 --> 00:04:08,550
All the things on here like here I have to do.

74
00:04:08,550 --> 00:04:14,790
I have to first of all, define the if condition and then our request and this request our user.

75
00:04:15,150 --> 00:04:18,250
First of all, this will be displayed, our authenticated user.

76
00:04:18,310 --> 00:04:23,010
So if you want to find out that authenticated user, I have already discussed about that things with

77
00:04:23,010 --> 00:04:26,070
you that have another function as it is authenticated.

78
00:04:26,310 --> 00:04:29,700
And now I also want to define our this requested user details.

79
00:04:29,700 --> 00:04:37,410
That means here I take one of the variable of the current OK, GARANT and then user and then this request

80
00:04:37,410 --> 00:04:39,130
and that is requested user.

81
00:04:39,480 --> 00:04:41,220
So this is to go to the user.

82
00:04:41,220 --> 00:04:43,340
I want to do I want to get all the data.

83
00:04:43,360 --> 00:04:44,850
Sorry user.

84
00:04:44,850 --> 00:04:48,270
I want to get all the data like here if you want to check it.

85
00:04:48,270 --> 00:04:50,220
I want to check it first, then it will be better.

86
00:04:50,220 --> 00:04:54,860
I want to paint it, I want to print our this current user.

87
00:04:54,870 --> 00:04:58,670
That means here I take the things with this variable that requested user.

88
00:04:59,070 --> 00:04:59,780
So just simple.

89
00:04:59,950 --> 00:05:10,330
Defining it, this kind of user, I want to access that user name and also I want to print I want to

90
00:05:10,330 --> 00:05:18,240
print out this current OK, this current user I email, that's all that our database will actually write.

91
00:05:18,490 --> 00:05:24,940
And now also, if you want to check that I did that this current user is already authenticated, in

92
00:05:24,940 --> 00:05:31,110
particular that position with this current user ID, if you want to also get you can also get it.

93
00:05:31,750 --> 00:05:39,490
So I just simply defend the print and then the current current user I.D. that our database table filename,

94
00:05:39,490 --> 00:05:42,190
as I decide, just simply defined as the idea on here.

95
00:05:42,340 --> 00:05:44,200
OK, so now I want to check it.

96
00:05:44,200 --> 00:05:51,610
Like if you click the save all I you that the things we display on here, OK, everything is now running.

97
00:05:51,790 --> 00:05:57,760
Well now I just refreshed this space so now we should be getting all that this user data right now I

98
00:05:57,760 --> 00:05:58,980
am already logged in.

99
00:05:59,350 --> 00:06:05,380
So now if you open it now you can see snow perfectly display as a Karzi and it's perfectly defined our

100
00:06:05,580 --> 00:06:07,120
the other Gmail dot com.

101
00:06:07,600 --> 00:06:12,720
So here are defined as a user name, email and the ID and this crazy ID actually the two.

102
00:06:13,060 --> 00:06:18,510
So now I want to do I want to get all the data with the specific, this idea that this user data and

103
00:06:18,510 --> 00:06:20,720
to get the things with their specific decided.

104
00:06:20,730 --> 00:06:21,830
So if you want to get it.

105
00:06:21,830 --> 00:06:23,380
So I don't, I don't need this.

106
00:06:23,920 --> 00:06:29,160
I just simply remove to of this because here I want to get this laptop with a specific this user idea.

107
00:06:29,590 --> 00:06:29,890
Right.

108
00:06:29,920 --> 00:06:32,560
So now I have to do and take one of the variable as a user.

109
00:06:33,340 --> 00:06:39,460
Underscore, sorry, underscore basic info, basic info, whatever he wants.

110
00:06:39,460 --> 00:06:45,250
Right now I'm using as info and then what exactly you have to do with our user model.

111
00:06:45,670 --> 00:06:47,740
So we have to also import this user model.

112
00:06:47,740 --> 00:06:54,110
So with this user model, I want to do and define our object, OK, with this object, I want to do

113
00:06:54,110 --> 00:06:58,120
want to get this data that means our primary key, our primary gear.

114
00:06:58,120 --> 00:07:01,000
I have defined that things with our current user ID.

115
00:07:01,010 --> 00:07:04,120
So for now I want to do want to take the things we don't know, the variable.

116
00:07:04,330 --> 00:07:08,640
OK, so here we don't need this printed because I have already checked it.

117
00:07:08,650 --> 00:07:10,960
So here I take this data that means specific.

118
00:07:10,960 --> 00:07:13,060
This is our data and take the things we don't know.

119
00:07:13,080 --> 00:07:16,860
The variable as a user underscore ID.

120
00:07:17,440 --> 00:07:22,210
So I just take this, our specific current user added data and take that things with this variable.

121
00:07:22,510 --> 00:07:24,280
So into the primary key area we have to do.

122
00:07:24,280 --> 00:07:29,800
We have to pass it right when I hope is very much clear to you and the rest of this will be the same.

123
00:07:30,190 --> 00:07:33,060
And then also here I'm using that our user.

124
00:07:33,070 --> 00:07:35,080
So we have to also include it.

125
00:07:35,710 --> 00:07:37,210
That means we have to import it.

126
00:07:37,240 --> 00:07:47,310
OK, so here I define as a form and that Django and the country art and the models.

127
00:07:47,380 --> 00:07:50,400
OK, and then I want to import our user.

128
00:07:50,410 --> 00:07:51,920
So to simplify that user.

129
00:07:52,510 --> 00:07:53,020
Perfect.

130
00:07:53,050 --> 00:07:56,080
So here I want to display our user details.

131
00:07:56,080 --> 00:07:59,640
So here I have already defined our user with this user.

132
00:07:59,650 --> 00:08:03,070
We will get all that our user email address and the user name.

133
00:08:03,070 --> 00:08:07,180
And also I want to display our Facebook ID that in the Facebook Eurail.

134
00:08:07,180 --> 00:08:10,120
And also I have defined another one as a.

135
00:08:11,450 --> 00:08:16,940
Profile picture, so if you go to our models, you do the models, I have defined all the things you

136
00:08:16,940 --> 00:08:17,210
can say.

137
00:08:17,210 --> 00:08:21,040
I have defended Facebook I.D. and the profile picture with this model.

138
00:08:21,260 --> 00:08:22,840
That means our user info model.

139
00:08:22,850 --> 00:08:28,490
So we have to also put it we have to also put it in our view area.

140
00:08:28,520 --> 00:08:29,270
That means here.

141
00:08:29,390 --> 00:08:30,680
OK, better after this.

142
00:08:30,680 --> 00:08:32,720
I want to use it as a form.

143
00:08:32,990 --> 00:08:37,610
So that is in our application, in our logging application and the logging application.

144
00:08:37,610 --> 00:08:38,330
That is our model.

145
00:08:38,400 --> 00:08:38,640
Right.

146
00:08:38,990 --> 00:08:43,400
So now it is simply of the logging that we, you know, logging app.

147
00:08:43,400 --> 00:08:45,100
And then here there is the models.

148
00:08:45,920 --> 00:08:47,240
So into the models.

149
00:08:47,240 --> 00:08:50,000
I want to import into this from this model.

150
00:08:50,000 --> 00:08:55,820
I want to import what I want to import our this model that we model plus as the user info.

151
00:08:56,270 --> 00:08:58,490
So we have to use it.

152
00:08:58,610 --> 00:09:04,100
So I have already get all that our email address and our user name with this user.

153
00:09:04,100 --> 00:09:07,400
And now also we have to get all the data from our user info.

154
00:09:08,150 --> 00:09:11,300
So here that is our message.

155
00:09:11,330 --> 00:09:14,060
So from here I have already get our user details.

156
00:09:14,450 --> 00:09:17,720
That means they use a name and email address.

157
00:09:17,820 --> 00:09:21,110
Now I want to do undertake another variable as a user.

158
00:09:21,270 --> 00:09:25,120
More info, more underscored info.

159
00:09:25,310 --> 00:09:29,360
And from this, I want to do want to use our LOURD model or model.

160
00:09:29,360 --> 00:09:30,430
Is it user info?

161
00:09:31,100 --> 00:09:31,460
Right.

162
00:09:31,490 --> 00:09:37,500
So that is I have already imposed this our user info and into this user info area from here and the

163
00:09:37,740 --> 00:09:41,620
of the object sorry objects.

164
00:09:42,290 --> 00:09:47,320
So with these objects I want to do and get our this primary key.

165
00:09:47,330 --> 00:09:51,770
So if you want to display this primary key here, you have to define our this model.

166
00:09:52,010 --> 00:09:55,420
And in this model area you can see I have also defined on big.

167
00:09:55,460 --> 00:09:58,780
So here I have already created the relation that is a one to one relation.

168
00:09:59,120 --> 00:10:04,250
So if you want to display any kind of want one deletion primarily, then you have to define that things

169
00:10:04,250 --> 00:10:09,020
with our first of all, that the user because of all here, I take that things with this user.

170
00:10:09,050 --> 00:10:09,390
Right.

171
00:10:09,740 --> 00:10:10,850
So with this user.

172
00:10:10,850 --> 00:10:15,600
And then you have to define double on the line and then the primary key.

173
00:10:15,800 --> 00:10:17,390
OK, so now our primary.

174
00:10:17,510 --> 00:10:20,900
I have defined our primary that in the current is the primary key.

175
00:10:20,990 --> 00:10:24,710
Take the things with this user ID, so I just simply pass it on here.

176
00:10:25,170 --> 00:10:30,050
OK, so now so we successfully get all the data from our table.

177
00:10:30,050 --> 00:10:36,080
That means that with this user model we get our email address and also this user user name.

178
00:10:36,200 --> 00:10:43,480
And with this we that means for our user info model, we get our two of these data as a Facebook Eurail

179
00:10:43,490 --> 00:10:45,320
and also the profile picture.

180
00:10:45,470 --> 00:10:51,200
And also here I define with the specific primary key that this user ID and that this current user ID

181
00:10:51,200 --> 00:10:51,710
details.

182
00:10:51,710 --> 00:10:52,070
Right.

183
00:10:52,070 --> 00:10:57,320
So we get all the data for no one to do and the visible sound visible in our index.

184
00:10:57,680 --> 00:10:59,890
That means that is actually our index e-mail.

185
00:10:59,910 --> 00:11:04,060
So now go to our template into the template that is our index estimator.

186
00:11:04,610 --> 00:11:08,500
So if you want to access this, all the data we have to do, we have to pass it right.

187
00:11:08,510 --> 00:11:11,120
So here we have to pass it after this.

188
00:11:11,570 --> 00:11:18,190
So after this, I take as a dictionary, as a D and then our we have to pass all that, our detailed

189
00:11:18,200 --> 00:11:18,680
data.

190
00:11:19,010 --> 00:11:22,460
So from here we have to pass our user basic info.

191
00:11:22,970 --> 00:11:25,670
So I just simply pass it as a basic info.

192
00:11:26,720 --> 00:11:33,400
And also after this, we have to pass out another filter that means our user more info data.

193
00:11:34,190 --> 00:11:34,400
Right.

194
00:11:34,580 --> 00:11:39,700
And I think everything should be very much clear to you because I have explained everything.

195
00:11:40,010 --> 00:11:42,490
So now also we have to pass out this one.

196
00:11:43,100 --> 00:11:44,810
So here we have to pass it.

197
00:11:44,810 --> 00:11:45,090
Right.

198
00:11:45,350 --> 00:11:51,620
So now I have already passed everything in our that is our user details data and also pass our that

199
00:11:51,620 --> 00:11:52,600
is our user.

200
00:11:52,640 --> 00:11:55,490
All that you have Facebook you are and the profile picture.

201
00:11:55,640 --> 00:11:59,410
And also now we have to do we have to pass out this dictionary in the context area.

202
00:11:59,420 --> 00:12:00,590
So I have already passed it.

203
00:12:00,770 --> 00:12:01,250
Perfect.

204
00:12:01,490 --> 00:12:04,300
But now we can actually access all that our little data.

205
00:12:04,310 --> 00:12:09,420
That means user messaging for data and we use our Moreen for that in our indexed e-mail.

206
00:12:09,830 --> 00:12:13,260
So now I want to display in our indexed e-mail go to here.

207
00:12:13,520 --> 00:12:18,140
So here we have displayed so friend better want to do and to continue this process.

208
00:12:18,140 --> 00:12:20,940
And in our next video, I'll complete the total part.

209
00:12:21,290 --> 00:12:22,750
So thanks for watching.

210
00:12:22,760 --> 00:12:24,620
I will see you in the next video.
