Hello, friend, welcome back.
In a previous video, we successfully complete our locking portions and right now we are locked in.
So in this video, I want to discuss about that lock out.
So if you are working this lock out, first of all, you have to do have to work in our authentication
without integration into the video.
Right.
So before we have already added our two of this matter to the authenticate method and the locking method
from our Django.
Right.
That is also the following the method.
So right now they have put the logo.
They have also another one.
They have another method as a logo right now to do, first of all and load it as a log out.
OK, so make sure you add it so there is a log out method.
So with this log old method very easily, we can actually add that log functionality.
So for the log out, we have to do we have to create another function.
So before doing this, I want to do I want to put some of the link in our D profile that matches the
profile that is a logout area.
So now go to our profile e-mail and under the profile estimate, the result log out.
Right.
So here I want to do to put all of that.
You are l so here if you want to add that you are lighting, you already know about it.
The result you are l and then I want to do I want to put that one of your name as a log out, whatever
you want.
Right now I just make that inside the log out.
So now we have to do we have to create this.
All right.
We have to create this also.
We have to create it in our authenticate.
And that is where you are.
So here I want to do to create it.
I just simply copy it here.
I pasted.
I want to create or I just make that name.
So as a logout, OK, it will be as a logo and the for the good password here.
I also want to add it.
That is OK.
And then I just put that name, I put that name, our name will be as a logo.
So I just simply added that as a logo and into the area.
I name it as the art logout.
OK, that means the artwork also now into the video we have to do we have to create our this method
as an art logout.
So now go to our view and that means authenticate and the view.
So here this portion logging and after this I can be for the registration here I want to do and to create
one of the other function as a day of our function name will be as a logo.
And here what exactly we have to do, we have to pass that request.
Right.
I just simply put that and it's pretty simple without this logout method, with this this method I want
to do, I just simply added our logo method and into the method area.
I just simply pass that request.
OK, so that's all you have to do.
And after that, what it'll be like old.
What exactly should be redacted.
You can also add it.
So I just simply added as a returned and redirect.
So to the return redirect I have also lowered our redirect function.
That means the direct method as a redirect.
So we decided to return the direct I want to do I want to pass some of the page.
That piece wanted will be as a logo, then it shall be rejected which page I want to do and do and should
be subjected to our logging base for the logging.
I have already created one of the you all saw your name as a logging right.
That means you should be directed toward this particular base area.
So for the reasons here, uh, in our view, sorry.
So that is a clear view.
And the view area is to be addicted to our logging base.
OK, I hope is very much clear to your friend.
So that's all you have to do for the log out.
OK, so now let's check this out.
If you not to save all, first of all, to check their server.
Yeah, you can see this appropriately running now when you free this space and now go to a logout.
Yes, you can see it's not perfectly locked out and it also needs to be logout.
I just simply added that as a return redirect with the cataloging base.
So now the system perfectly adequate to a logging base.
So now from here you can log in and also from here you can log out.
So I just created as a Arion Etiwanda, three, four, five as a logging.
Yeah, we successfully logged in because a log out.
Yeah.
We successfully now logged out.
And when you log, no difference automatically our disspain, which is nothing as of my account and
also into the profile area.
If you want to display your name, that means your username.
So I just simply first of all, logging, because logging right now into the main media, if you want
to display which user is already locked in, you can also display that is also the follow one with the
user.
We can actually did that work so far displayed?
We have to go to our profile so that the name area.
So here and they are going to the PAETEC, I just name it as a log in by logging by and then our user
name.
OK, so here if you want to display it is pretty simple with the user, with this user.
They have, as I told you in Django, in our admin area, they have the default of the field as a user
name.
So I know what to do and to display our user name that this user user name, which will be visible,
no Google Savol.
And now if you refresh it now, you can see it's not perfectly displayed as a log thing by Arion.
So here you can do ads on the V-Tech, then it'll be better.
I want to make that as a board of reference, so just simply got it.
And here I posted that they are posted.
So I just to save also a little different with this user, you have to access that username.
So this user name actually in our admin area.
So obviously I have already discussed about that things with you into the admin area that have on the
table as user table and user table area.
They have the by default on the table feel as if username, email, first name, last name so you can
actually access it.
If you want to access it, you can access it with this user.
OK, so you can access it with this user.
And right now I am to display our filename at the user name.
So right now if you refresh it, yeah.
You can see it's perfectly showing as a locking by the alian.
So I hope friend is very much clear to you.
So, you know, next video I want to discuss about one of the other most important things as a messaging
option.
Like from here, if you click on a log out, OK, when you click on the log out, then it will be displayed
some of the message so you can display this message in our next video.
I will show that things with a live example.
So thanks for watching and I will see you in the next video.