1
00:00:00,150 --> 00:00:01,830
Hello, friend, welcome back.

2
00:00:02,100 --> 00:00:07,680
In a previous video, we successfully locked in, right, so here we successfully complete our locking

3
00:00:07,680 --> 00:00:08,120
position.

4
00:00:08,430 --> 00:00:13,530
So right now I want to do want to work for our lock out so we can do working with this lock out.

5
00:00:13,530 --> 00:00:18,540
First of all, we have to do we have to create one of the method that means we have to create the function

6
00:00:18,900 --> 00:00:21,510
in our app locking and the Vaidya.

7
00:00:21,960 --> 00:00:23,910
So there is a locking function.

8
00:00:23,910 --> 00:00:28,550
And after that, after that, I want to do to create another function for the lock out.

9
00:00:28,860 --> 00:00:35,560
So if you want to create that function with the Dave and I just name it as a logout user logout underscore

10
00:00:35,580 --> 00:00:36,110
user.

11
00:00:36,780 --> 00:00:38,850
So that will be our logout is around here.

12
00:00:38,850 --> 00:00:43,500
Also, we have to do have to the same as a request and then we have to do.

13
00:00:43,740 --> 00:00:49,590
I have already and I've already loaded our logout mattocks with this logout method.

14
00:00:49,590 --> 00:00:51,180
We can do that work very easily.

15
00:00:51,600 --> 00:00:55,470
So I just simply added our logo and the logo area.

16
00:00:55,470 --> 00:00:57,090
We have to past our request.

17
00:00:57,090 --> 00:00:57,400
Right.

18
00:00:57,720 --> 00:01:01,770
So then after that here I want to do quaintness will be successfully logout.

19
00:01:01,770 --> 00:01:03,440
What exactly should be detected.

20
00:01:03,980 --> 00:01:11,280
I just make as a return and return with our EDP EDP response to direct here.

21
00:01:11,280 --> 00:01:14,850
I want to do the reverse and would the reverse.

22
00:01:14,850 --> 00:01:18,720
I want to do all the positives will be redirected to our logging base.

23
00:01:18,750 --> 00:01:24,330
OK, so for the logging, I have already created one of the you you know, our app logging and at the

24
00:01:24,330 --> 00:01:24,900
URL.

25
00:01:25,410 --> 00:01:26,610
So that is all logging.

26
00:01:26,610 --> 00:01:30,450
Right, so that your signing piece is will be redirected to particular displays.

27
00:01:30,450 --> 00:01:35,820
And now here I just simply added our signing that this to be the key to a logging base.

28
00:01:36,060 --> 00:01:42,690
And also here I want to do one things like when you want to access this function, then this user must

29
00:01:42,690 --> 00:01:43,680
have to be logging.

30
00:01:43,850 --> 00:01:46,630
That means we know what this log out optional will work.

31
00:01:46,650 --> 00:01:49,170
First of all, this user must have that logging.

32
00:01:49,170 --> 00:01:52,510
So that means the logging will be required for access or this method.

33
00:01:52,660 --> 00:01:52,880
OK.

34
00:01:52,920 --> 00:01:58,680
So if you want to do that in Django, they have another method as a logging request.

35
00:01:58,980 --> 00:02:00,810
So that is in our decorator's.

36
00:02:00,810 --> 00:02:04,440
So here, first of all, we have to do we have to import it.

37
00:02:04,710 --> 00:02:09,130
So that is in our FROM and then Django and then country.

38
00:02:10,290 --> 00:02:15,330
So that is a country and form of the Django entre sorry.

39
00:02:15,720 --> 00:02:21,140
Or and then the decorators from the decorator's.

40
00:02:21,150 --> 00:02:30,200
I don't want to import one of the matter that the logging underscore Ricot walking on whiskery good.

41
00:02:30,510 --> 00:02:33,720
So with this logging required you can make your function.

42
00:02:33,720 --> 00:02:38,450
That means this function as a recursive Frontex as this function you have to must locking.

43
00:02:38,490 --> 00:02:40,920
OK, so now I want to use it.

44
00:02:41,130 --> 00:02:43,380
That means for all this log out here.

45
00:02:43,830 --> 00:02:49,770
Here I will have to we have to just simply add that logging that means first of all, this user must

46
00:02:49,770 --> 00:02:54,880
have to be logging if this user wants to access this log out function, OK?

47
00:02:55,740 --> 00:03:00,440
And now I want to do and to create on the wall for this logout user.

48
00:03:00,450 --> 00:03:07,260
So you know what you are so here I want to do to create a new one and then just name it as a log out.

49
00:03:09,940 --> 00:03:15,840
OK, just name it as a log old and also name that our these so of the log out.

50
00:03:15,840 --> 00:03:22,350
And also in our view area, I have created one of the function function name as a logout user.

51
00:03:22,770 --> 00:03:25,820
So no, I just simply load our dis log out the user.

52
00:03:25,920 --> 00:03:28,290
So no I want to do want to add that our e what.

53
00:03:28,470 --> 00:03:31,610
I want to add that you order and here I want to add another.

54
00:03:32,490 --> 00:03:35,160
So if you want to do that work that is our basis.

55
00:03:35,160 --> 00:03:38,430
HTML so go to our basic HTML and into this page.

56
00:03:38,820 --> 00:03:39,580
That is our menu.

57
00:03:39,630 --> 00:03:39,950
Right.

58
00:03:40,320 --> 00:03:46,200
So here I want to add another one and I want to add another one for the better.

59
00:03:46,200 --> 00:03:50,220
I want to add another one for the logging so it will be as a logging.

60
00:03:51,530 --> 00:04:01,050
OK, so we have the logging and then I want to take another one better here, here and take another

61
00:04:01,050 --> 00:04:02,190
one for the log out.

62
00:04:02,820 --> 00:04:04,890
It'll be as a log out.

63
00:04:05,970 --> 00:04:08,010
So it'll be either log also for the logging.

64
00:04:08,010 --> 00:04:13,410
I have already created one of the you what are you are a name in our app name as the app logging and

65
00:04:13,410 --> 00:04:14,720
then our signing.

66
00:04:14,730 --> 00:04:15,050
Right.

67
00:04:15,750 --> 00:04:23,040
So here I name it as a signing and for the log out in our mind that is, you know, our app logging.

68
00:04:23,040 --> 00:04:27,600
That means our app name with this app logging, we can actually access all this log out.

69
00:04:28,170 --> 00:04:31,020
So that will be our app logging and the log out.

70
00:04:31,380 --> 00:04:37,590
So friend here I want to do want to add one of the condition, like when this user is already logging,

71
00:04:37,590 --> 00:04:44,220
that means when this user is already authenticate, this user can access at this two of this that this

72
00:04:44,220 --> 00:04:49,770
home and the log only visible either then our this sign up and the logging will be visible.

73
00:04:49,920 --> 00:04:53,370
OK, so you then everything will be more clear to user here.

74
00:04:53,370 --> 00:04:58,110
I want to put one of the condition I just added one of the if condition.

75
00:04:59,310 --> 00:04:59,820
I just.

76
00:05:00,280 --> 00:05:06,610
If condition, if that user that is also one of the by default user, I want to use it and also the

77
00:05:06,760 --> 00:05:08,770
monitor my policy is authenticate.

78
00:05:09,130 --> 00:05:11,710
Underscore is underscore authenticated.

79
00:05:14,290 --> 00:05:16,360
So this is authenticated methode.

80
00:05:16,360 --> 00:05:17,420
We can add it.

81
00:05:17,440 --> 00:05:23,040
So first of all, we check it if this user is authenticated that perceived this user is login.

82
00:05:23,350 --> 00:05:27,180
So then our two of these men will be visible and else.

83
00:05:27,460 --> 00:05:35,110
So here I want to do and to add as the URLs else, our first of these two men that want to have this

84
00:05:35,110 --> 00:05:43,960
manually visible software that here I want to do want to finish our if condition at the and if I hope

85
00:05:43,960 --> 00:05:45,440
is very much clear to friends.

86
00:05:45,440 --> 00:05:47,290
So I just put one of the if condition.

87
00:05:47,290 --> 00:05:54,190
If this user is authenticated that this user is login, then it shall be displayed our home button and

88
00:05:54,190 --> 00:05:59,500
the log button and else is be displayed our sign up button and the logging button.

89
00:05:59,800 --> 00:06:04,530
OK, so here I want to check it like here if you click on the save wall.

90
00:06:05,170 --> 00:06:07,090
So first of all, I want to check their server.

91
00:06:08,740 --> 00:06:15,970
You can see they have some of the Airaud as a logout request, so the log goes ahead showing the invalid

92
00:06:15,970 --> 00:06:16,680
Syntex.

93
00:06:17,230 --> 00:06:20,700
So go to our view into the view area.

94
00:06:20,950 --> 00:06:22,420
That is our request.

95
00:06:22,720 --> 00:06:28,900
You can see I just use that as a dispenser here to not need be will be needed on here.

96
00:06:29,370 --> 00:06:30,840
That will be our local request.

97
00:06:30,850 --> 00:06:31,300
Perfect.

98
00:06:31,720 --> 00:06:33,190
Not like at this table.

99
00:06:34,300 --> 00:06:36,300
And I want to check it here.

100
00:06:36,340 --> 00:06:38,540
You can see everything is done perfectly running.

101
00:06:39,070 --> 00:06:41,520
Now go to our site, refresh it.

102
00:06:41,950 --> 00:06:42,720
Yes.

103
00:06:42,730 --> 00:06:47,910
You can see right now, I'm already logged in for the reasons here because there are two of these men

104
00:06:48,100 --> 00:06:49,620
visible here.

105
00:06:49,630 --> 00:06:51,760
I just simply added that condition.

106
00:06:51,760 --> 00:06:58,090
If this user is authenticated, our home button and the logout button on the visible ale's, that means

107
00:06:58,090 --> 00:07:03,820
if this user is not authenticated, if this user is not logging, then our two of these men will be

108
00:07:03,820 --> 00:07:04,320
visible.

109
00:07:04,360 --> 00:07:04,700
Right.

110
00:07:05,140 --> 00:07:10,720
So now if I know I'm already logged for the reasons he's showing us the home and the log out, so not

111
00:07:10,730 --> 00:07:15,260
only just click of the log out, so here you can see snowshoeing as a sign in.

112
00:07:15,260 --> 00:07:18,310
Not can't understand what exactly the things I did.

113
00:07:18,530 --> 00:07:21,160
You can see the reverse area I added as a sign.

114
00:07:21,160 --> 00:07:25,090
And so also we have to do we have to add our app name.

115
00:07:25,310 --> 00:07:27,400
That means here that is our app name.

116
00:07:27,400 --> 00:07:29,990
And after that name we have to use our design in.

117
00:07:30,010 --> 00:07:30,290
Right.

118
00:07:30,820 --> 00:07:32,900
So right now here.

119
00:07:33,400 --> 00:07:37,150
So first of all, it will be our app logging and then our signing.

120
00:07:37,150 --> 00:07:38,800
That means that is actually our logging.

121
00:07:39,400 --> 00:07:41,350
So now I just click as save.

122
00:07:41,890 --> 00:07:46,120
So friend here indexes perfectly working because of all in our index area.

123
00:07:46,120 --> 00:07:48,130
I didn't add any app logging.

124
00:07:48,130 --> 00:07:53,110
Like if you go to our main site, that is our main block project.

125
00:07:53,110 --> 00:07:56,620
If we go to that you URL here, you can see here I didn't add any app name.

126
00:07:56,980 --> 00:08:02,680
So for the reasons our direct contact with our directory, all parties working so that your name is

127
00:08:02,680 --> 00:08:07,000
working, but here you are only added one of the app name.

128
00:08:07,000 --> 00:08:08,710
So that will be our app name.

129
00:08:08,710 --> 00:08:13,520
First of all, you have to add it and then you have to call that your name.

130
00:08:14,050 --> 00:08:16,420
So now I just have to save all here.

131
00:08:16,420 --> 00:08:17,790
I just simply updated it.

132
00:08:18,130 --> 00:08:23,380
So first of all, that will be our app logging and then our signing right now.

133
00:08:23,380 --> 00:08:24,100
Let's check this out.

134
00:08:24,100 --> 00:08:29,130
If you are going to go back and refresh it so you can see it's already logout.

135
00:08:29,380 --> 00:08:32,860
Step is all log is perfectly working so you can see when it should be.

136
00:08:32,860 --> 00:08:36,310
This user is log out, then our tool dispenser visible.

137
00:08:36,310 --> 00:08:41,830
That means here right now, our sign up and logging menu is visible right now.

138
00:08:41,830 --> 00:08:47,140
I want to log in again and log to that our user name as a test.

139
00:08:47,710 --> 00:08:49,620
And you give me one, two, three, four, five.

140
00:08:49,750 --> 00:08:50,980
Now click as a login.

141
00:08:52,030 --> 00:08:56,200
Yeah, you can see it's now becoming updated menu as a home and the log out.

142
00:08:56,320 --> 00:08:56,770
Right.

143
00:08:56,770 --> 00:08:58,290
And then that is our home page.

144
00:08:58,300 --> 00:09:03,700
And if you click as a log out now, you can see it's not perfectly successfully log out and sign up

145
00:09:03,700 --> 00:09:04,930
and the logging is visible.

146
00:09:05,470 --> 00:09:07,720
So home is actually needed.

147
00:09:08,350 --> 00:09:09,170
Embitter.

148
00:09:09,190 --> 00:09:11,640
I want to do Underbool.

149
00:09:11,800 --> 00:09:13,570
I make the things from here.

150
00:09:13,570 --> 00:09:14,320
I got it.

151
00:09:14,320 --> 00:09:21,580
And before I added and after this for this log out, I want to do I want to make out this authenticated

152
00:09:21,880 --> 00:09:28,690
because of all for our home base with that home base will be needed right now if you click disable and

153
00:09:28,690 --> 00:09:30,190
now if you refresh.

154
00:09:30,190 --> 00:09:35,560
Yeah, you can see snowshoeing as a home sign up and the logging because of all right, now I'm not

155
00:09:35,560 --> 00:09:36,040
logging.

156
00:09:36,700 --> 00:09:39,650
So for the reasons it's not showing our tree of this.

157
00:09:39,650 --> 00:09:44,620
So that is showing our home and then our authenticated our logo to the visible point.

158
00:09:44,620 --> 00:09:46,070
This user is authenticated.

159
00:09:46,070 --> 00:09:50,320
That means when the user is logging, OK, again, I want to test it.

160
00:09:50,830 --> 00:09:52,720
So I make the test.

161
00:09:53,050 --> 00:09:55,420
You do me one, two, three, four, five.

162
00:09:55,930 --> 00:09:56,860
Because of logging.

163
00:09:57,790 --> 00:09:58,180
Yeah.

164
00:09:58,180 --> 00:10:00,460
Now because it's not perfect, visible as a home.

165
00:10:00,460 --> 00:10:01,800
And then I will log out.

166
00:10:01,810 --> 00:10:02,590
So that is our home.

167
00:10:02,590 --> 00:10:03,940
Basically there's a log out.

168
00:10:04,360 --> 00:10:06,610
It's not perfectly detected to logging paste.

169
00:10:06,610 --> 00:10:09,400
So here I just simply add that condition.

170
00:10:09,760 --> 00:10:13,570
So when it will be as a log to then it should be returned.

171
00:10:13,570 --> 00:10:15,850
And our Utah is TDP responsibility.

172
00:10:16,150 --> 00:10:20,710
The reverse I used will be passed to our app logging sign in base.

173
00:10:20,710 --> 00:10:21,190
Right.

174
00:10:21,190 --> 00:10:27,870
So you can see it's not perfectly clear or logging base so friendly successfully complete our log portion.

175
00:10:27,890 --> 00:10:31,000
We successfully complete our sign up and the logging portions.

176
00:10:31,000 --> 00:10:31,330
Right.

177
00:10:31,330 --> 00:10:35,800
So from here you can sign up, you can logging and also you can log out.

178
00:10:36,220 --> 00:10:41,590
So now I want to do want to work with our some of the user profile, like when this user will be logging

179
00:10:41,590 --> 00:10:44,450
and for this user there should be some of the profile page.

180
00:10:44,590 --> 00:10:50,170
So can working with the user profile in our next video, I will show that things with a live example.

181
00:10:50,590 --> 00:10:53,950
So thanks for watching and I will see you in the next video.
