Hello, friend will come back in a previous video, we have successfully designed all the tower authentication
base, that is the logging base that is a FOLGATE password base.
Right.
And also I have designed another page for the radio station, so step by step will work with it.
So first of all, I want to do want to work with the logging and into the logging that the Tuffield
one is the email and here I name it.
And there is a password.
Right.
So here if you go to our admin panel.
So that is one of the single application admin panel.
And this here, if you go to that admin and if you go to that user and the user here can see that is
actually our super admin.
Right.
So I have already created one of the super admin user.
So right now and do to create another user from here.
So the Little League will also create it from our sister station.
So right now for accessing it, I want to create one of the new user and I just name it as the area.
And I just put on the password as you do.
One, two, three, four, five.
And you do me one, two, three, four, five.
OK, so right now I just simply create all the user manually from our admin panel.
So now you can see the regular user name, the password, but here one.
So in general, that is the default authentication system and the default indication systems that have
some of the by default on the feel like a user name, feel there is a password, there is a fast name
for the last name and the email address.
OK, so that is actually all that by default.
So we have to do we have to actually use it.
That means there is a clone of the database table and the user database table area.
There is all that field.
OK, that is user table area.
That is one of the feel of the username, password, fast name, last name, email address.
So now with this we can actually access our two of these likelike here right now if they log out and
if you go to that our admin and with that we can see that the user name and the password.
Right.
And also here, when you create new users, then you have to put that username and password.
Right.
So for the reasons here, I have actually created it.
So if you click as our username and password, click is a logging.
And if you go to that user, I have created one the user name user.
You can see that the user name Azarian.
So now I don't actually work with this.
So here that is our logging base.
First of all, I want to working with our this logging base.
So if you go to our site and that is our template and that is our logging system.
All right.
So here that is the our form.
So that is our input form.
So right now, I actually want to do want to change it.
I want to make that as a text type, because here I have to do I have to logging with that user name.
And also here I named as the user name.
OK, name it as a user name.
And then that will be as a user name or user name, and then that will be another feel for our other
password and that idea so better.
And also updated our ID as idea and that will be for the password.
OK, I the password and the name I just added as a password at the our name.
As a user name.
Perfect.
And then that is Iglauer forget password and then locking.
Perfect.
So here Fred, I have updated two of these, our input file, one input file for our user name and on
the list for our password.
And from here, when you click on the logging, they are automatically redacted to our section.
That is form action with our Casarett token.
That means it will be redacted to our authentication.
That is actually authentication and that is our view and that is a logging OK, that is automatically
used to be elected to a particular data area.
So now here I have to do I have to get out of this request.
That means here the result of this request better.
I want to just click the save all.
And if you now refresh it.
So right now, consider user username field, and that is our password field.
So one of the things we'll post on here, first of all, we have to actually get it right.
So for doing this here, that is that this that is Iglauer authentication and the views here, I have
to work.
So first of all, I want to create one of the if condition, as we did that before, if our these secrets
are with this secret, we have to access that mattered.
Right, with this method.
First of all, I want to check it.
This is actually post method or the method so that no, I just simply added to the post.
So first of all, I want to check it and then I want to do I want to actually take on the variable.
I just made me do whatever he wants, that I name it as username.
And with this username, whatever the data I will pass from here, that means there is a cloud input
field.
Whatever the data I pass from here, we have to get it right.
So now I just simply added that this request was data.
So these two Crespo's data from our Phelim, so our filename, I have already added that filename as
username.
So whatever he wants right now, if you want to use that name, you can use that name.
So right now you're stuck with me.
I just mean that our input field as a username.
So here I just simply add it.
And also I have to do I have to take another one.
I have to take another one for a while and another password.
That means that is another input field as a password.
So I just simply added that password and I just take one of the variable name as a password.
OK, I just simply added both of these.
So now we have to do we have to check it.
That means whatever data I just from our input feel pass it.
First of all, I want to check it.
That means that is our input field as a user name and there is a password.
So I want to match two of these to our our authentication.
That means a Django default authentication that is actually on the table that does it use a table.
OK, so into the user table area.
I want to check it out, this user name and also to check if there is a password.
Right.
I want to check both of this.
Like here you can see the username and password.
So who in that will be matched then?
It will be do some of the action.
Reckford So for the reasons here, I want to check it.
So if you want to check it in Django, they have also not the default one of the method.
So with this method we can actually check it.
So that method name as they authenticate.
First of all, if you want to use it, first of all, you have to, you have to load it.
There is a form and the Django and then the country.
OK, there is a form, Django Cantrip and the art.
And from here you have to do you have to import this authenticate, OK, that is the authenticate of
the method and also for the logging.
And they have that other method as a login.
So just simply also take it because of all its will.
We also need it.
So now I just take both of these from our old authenticate and also the logging.
OK, and also we need our redacted.
So if in our render area, but also take another method as a redact, it will be needed when our disposal
will be successful.
What exactly should be redacted?
For the reasons here I take another method class of the redacted.
So to simply add it perfect.
So now with this authenticate we can actually take it.
And here one thing that is cloud the default method, the logging and our method name also added names
and that the same name as a log.
So then it shall be clear on the confliction.
So better I want to change that name.
That means our function name I named as the opt out logging.
So here, if you want to change it, then also here we have to do.
We have changed in our evolved into the URL here you say just name it our views as our method, name
as a logging signal and actually change it.
I make that this is an old logging and then for the register also I want to change it, the art register.
OK, so I just simply copied.
And now in our view that will be our and then it will be the end of the conflict.
OK, that is actually the same name.
So right now it's perfect.
So that is authenticate.
I import and also import the logging.
So it is authenticate.
We can actually check it.
That means our appropriate user name is appropriate or not and the password is appropriate or not.
OK, whatever that user name I pass from here, whatever the password I just pass from here, it shall
be checked.
It's the same as our admin username and password or not.
So for doing this is pretty much simple.
I take one of the variable as a user, ok, I just take one of the variable of the user.
And now with this authenticate, with this authenticate, I want to do I want to put that our first
of all, it should be already.
So with this request, I want to double check that request, our user name, that means this user name
actually friend in our admin, this user name.
As I told you, they have also the by default on the table as user table and they use it.
They will have the filename by default of the username and password.
So this username will be match.
This user name will be match with our at this logging that means here also name it as a user name.
Right.
First of all, shall we check it.
So I just simply check that the user name as the user name or not.
So here I take our all the cheekiest post and take the things with this variable.
So here I just simply pass it and also the same things for our password.
So this password fill in our database table and this password, our input will.
Right.
So I just simply added that password.
So that means you be check our username is the username or password is the appropriate password or not.
That means our request or password.
Right.
I hope is very much clear to you and it will be match.
Then I will return to port.
Another condition, one of the user and I just take all the our validation and take the things with
this variable.
So if our this user is not nom OK, so here I just put that condition if this user is not done.
But that means if there have any user data then it will be do some of the work right.
Then it should be do some of the work that we do and other works.
So for the reasons here I want to do that will be one more credit then that if that means this if condition
here, I don't want to add that another ale's else, it should be doing other work elsewhere.
I want to go to paying for the data I want to do and just print and print some of the data, the whatever
he wants.
Now I just name it as an invalid username and password or password or password.
So this type of the PIN data, it should be visible.
I hope you can learn a lesson about it, friend.
And when they have the appropriate data that is in our username and password name will be met, then
our this condition will work.
So into this condition area, I would want to first of all we thought this logging method.
Right, with this logging method, I want to turn to redacted our this authenticate user.
So I just simply pass that request.
So there is a request with this request.
I wanted to pass our this authenticate user.
I take the things with this variable.
So here I just simply pass it, I hope is very much clear to your friend and one that means it should
be perfectly logged it OK.
That means this user will be logged in an initial logging.
What exactly is will be redacted.
You can also set it on here.
So I just simply return some of the base.
I just simply added the return return and the redirect.
And also here I have added our one of the another method as redirect.
So with this direct, we can actually pass that user to the specifics of the base.
So here I want to do want to pass it, uh, like when it will be successfully down there to be redirected
to our profile.
I have already created on the page of the profile page.
Right.
So no end to the end of the Epis specific this space area.
So that is the I have created that is maybe in our employee that you are still young.
You can see that is our view and the profile that means here in the W there is a profile.
It should be directed to our employee and profile of this HTML.
Right.
Perfect.
That means that our name so our pop name there is a profile so to do and to pass it in particular that
area.
So here when it's to be successfully done then it will dictate our profile page.
Perfect, I hope is very much clear to your friend what exactly the things I did on here.
So now let's check this out.
If you click on the Save All Fosterville and to check, our server is perfectly now running and I have
already locked in as users right now to log with our decision and the password.
So that is I mean, I just simply log out and now here I refresh it.
So now I want to do that.
Our user name.
I have already created that user as a sorry Arion.
And also I put the password.
You do me one, two, three, four, five.
So it should be match.
It should be rejected to our profile page.
Right.
Don't let's check this out.
If you look at the logging.
Yes.
You can see friend, you know, perfectly directed to our employee profile page.
That means we can successfully logged in.
Right.
So here we can successfully now logged in.
As I told you, you still be.
Check this.
Our username and password is match and not winner shall be matched then with this logging here, I just
passed that request.
That means our request user data and then that means this user will be already logged in.
And then I just simply return redirect to a profile piece.
So that is our equal parts.
That is a profile.
And here you can see it's not perfectly redacted to our profile page, that incitement.
We successfully completed our logging portion.
Right.
I hope it's very clear to your friend.
So now I want to do here right now, I'm already logged in.
Right.
So when I am already logged in, then here the norm.
I want to change it like you should be logging.
Then it will be displayed the profile or something.
OK, right now that is on my account.
So right now I am already logged in.
So if you want to change it, you can change it with one of the simple conditions I show you.
So that is in our layout, right?
That that's mean we have added in our layout.
So no go at all levels.
That means in our templates and the results.
And here that is actually my or my account.
So that is on my account area.
So here I want to do the post on the condition I want to put on the condition as one of the if condition
that everything is really made in Django.
They have the also the method as it is authenticate.
So here I want to use it.
That means if our user.
OK, that is if this user is authenticate.
So with this user that is all the default one.
So you have to write down as it is and or authenticate
authenticated.
So with this method you can actually add it.
So here also you have to do we have to end it.
That means the end if condition.
Right.
So here I just simply added that.
And if that means when this user is authenticated, that means when this user is logging, then I want
to do want to visible on the menu.
So here I want to do all the visible on the menu as my profile will be displayed as my profile and else.
So I just simply added that URLs.
So here I added that Ale's aless will be displayed our my account.
OK, I hope is very much left to your friend.
That means with this is authenticate.
With this we can actually define our this user is already logged in or not.
So in this user is authenticated.
That means when this user is logging beneficial, we display our this menu as in my profile, Ailes
is still we display our locking the pins are my account.
OK, so for the profile, they have also one of the wall.
So our profile liberal as a profile.
So I just simply copy it and now in our layout.
So here I want to do and update our DRL as a profile right now.
Let's check this out if you click the save on.
So right now I'm already logged in.
Now, if you if not should be visible as in my account, it should be visible as if my profile right
now click of the refresh.
Yes.
You can see it's automatically updated and now showing, as in my profile.
Perfect.
So now I want to actually update our D profile page.
So that is our profile page.
If you go to that, you are L that is our view and the profile.
Right.
So that is our employee.
And if we go to that, our view profile function in the profile function, I have looked at our employee
and the profile.
So now if you go to that employee and the result profile is demo, right?
So I tend to do an updated.
So we try to do that.
Is our profile that the better?
I don't need this.
I just simply remove everything from here right now at the name, a little bit confused about it.
So there is a profile and now voter contact list.
So now I just simply copy everything from our contacts email and in a profile e-mail here, I just simply
paste it.
So here might know that is our form.
So we don't need this part.
Right there is our contact page, so I just simply removed it and that is all that contact from details.
I just simply remove it from here and also still be as a profile piece.
That means that it will be our title profile page and then the end blog and then the body blog.
It will be as a profile.
OK, or my profile.
If you want to add to my profile, you can add it as in my profile, my profile.
OK, so that will be my profile.
And then here we will need this map.
I just simply remove it because I save all and now refresh it.
Yeah, you can see that is my profile home and my profile.
So here I don't need this here.
I want to do I want to hear the.
These are just some pretty morbid I will be and also I remove it, so this.
I also don't need this actually.
I just simply remove it.
So I only want to take one would be as a name.
That means that our user name will be visible rather than easily visible as a logout.
OK, it'll be displayed as a log out, so for the logo, don't want to make the things one of the better,
not for text, I just simply added and our paragraph, they just simply added.
And here also want to add one of the if so, that will be a heavy Feria.
So just simply paste it.
OK, that will be the logo and also on to the end of the change that things like that.
Therefore I just make the things a six by six.
They'll still be better actually right now for added 12 columns.
And I'll make that things as this 12 column with a six and six.
OK, so I just also make that as a six.
Perfect.
Now let's check this out if we're going to save all and now if you refresh it.
Yeah, perfect.
There is a name and there is a log out.
And here I also don't need this icon.
That means that there are icons.
I just simply remove it and also I remove it.
We got to save all or refresh it.
Yeah, that is our name.
And there is a lot of person suffering right now.
We can successfully logged in.
Right.
So I have already discussed about the things we do.
I think it should be very much clear to you.
So that is our old logging function.
And here is a simple trick.
So with this we can actually do that work.
So, you know, next video on the want to work for a logo right now, I'm already logging, so can working
with the log out in our next video, I will show that things with a live example.
So thanks for watching.
I will see you in the next video.