Hello, friend, welcome back.
In a previous video, we successfully complete our distribution, so right now I want to do want to
work for a logging pace like here.
I want to do want to create another piece of the logging and into the logging page here.
If you put your appropriate username and password and then it should be logged in so we can do that
work.
In this video, I will show you that things with a live example for doing this.
First of all, we have to do we have to create one of the buppies.
That means one of the e-mail pays for our logging to now go to our project victory.
And here in our template area that is are logging up.
And here I want to turn to create the new fight.
And I just named that file as a logging dot XHTML.
Right.
So I just simply save it to this logging page.
First of all, we have to initialize all the things like here.
We have to initialize our extended version.
So I just simply copy it.
And then here it is simply pasted so that we don't need this.
I just simply remove it.
So here it will be extended our logging and the business HTML and that is our body block.
And also we have to do we have to finish that body block.
So that means this one bit to simply copy right underneath this.
And after this I just simply passed it.
Heidfeld I think you already know about it so that our main basis html so here we have to defining it.
So here I just extended our business HTML and now that is our main content putzing into this content
area.
I want to do first of all here I defend the S3 tag and here I name it as a please please login because
of this step up on the information that we say headliners to be visible.
And also after that I want to do the defining of the form because here also you have to define that
form and here we will need this class, but here we will need some the action.
So I will do that later.
So I can we will I just make that into the blank.
And also my thought will be as a post matter, I just make as a capital post.
Right.
So friend, before all we use our model form.
So right now I'm trying to create that as html from.
So with this e-mail from here, I want to define some of the input field and with this input file I
want to use it.
So right now we will need actually two things.
We need one of the user name and also the password.
Right.
So here we have to edit two of this input files.
As I told you before, we actually used you can see we use all of the our form.
That means our model form.
So that is another form.
So I right now to do and to create one of this table form.
So here, first of all, I want to do a different on the level and I just named that level as a user
name and then I just name it as a user name.
Right.
And also after that, I want to do undertake all of the input field.
So I just simply finally put type will be as a text type and I just input that filename as a user name.
And also here we don't need this any value.
I just simply remove it here.
I want to define the placeholder as it enter your username.
OK, and also I want to do and to make that field as a V good.
So I think you already know about it.
So I just make that feel as good.
And then we will need our another field and our field will be as a password.
So first of all, I define at the level.
Right.
So I just simply defined as a level and even the level here I name it.
So our for name, I just name it as a password and also here a defined as a password.
So also after that we have to define what the input field and the input type for the password here.
I defined the password as a password.
That means it will be as a password type and I just put that name will be as a password.
And also here I want to define some of the placeholder.
And placeholder will be as we enter your sorry, your password and also I want to make that field will
be also the record.
OK, and that is actually what the post matter.
Also here also we have to define our CSR field.
So I just simply define as a set of token CSR if underscore token.
OK, so that will be needed, that CSR token and then for submitting the things we have to define at
the bottom.
So I just simply defined all the input field and the input field type will be as a Soviet type.
And I just named that our input field as a submit and I just put that value value I just defined as
a login.
OK, just name it as a login.
So perfect.
So that's all we have to do here.
I have defined on the level of the user name and that is our input field.
And then there is another one as a password and that is our password field and then there is our submit
button.
So now I want to do I want to visible visibility.
So if you want to visually, then we have to create one of the function for this.
Right.
And also you have to create all the.
So now go to our view, that means in our application and that is our views.
So here, first of all, in particular, that area I want to undertake on the function as a day function
and then I may name it as a logging base, logging under escort phase.
And then also you have to pass the same things as a request.
And then I just simply the return and the render and then here I have to pass that request.
Right.
So I think for now, it should be easy to you because we did the same things a lot of the time then
our location.
That means in our template area, sorry, in our template area, that is our locking app.
I have created a stable base as a login, so I just simply defined that name as a logging into the logging
app folder.
That is our location as a logging dot still.
Right, and also here, I just simply our context, they just simply puzzle context, right?
I didn't defend any context of what reasons I just want to do and to make that things as a blank.
So now also we have to do we have to create one on the wall for these.
So now go to our application and that is our world.
And now for the locking out to do and to create another wall.
And I just name it as a login.
Right.
And deadlocking.
And that is our function.
I have already created all the function as a locking pace.
I simply copied and here and I actually mean that.
Galon So here it should be as one of the clone on particular data.
OK, so now I just simply copied and now you are able I just simply defend that view.
So that is our view will be our locking pace and I just name it as a login.
Perfect.
So now I want to do want to put the link in on it.
But that means here I want to add one of the another, another menu in particular in our neighboring
area.
So that is in our busy world.
So you have to go to our pages, HTML into the pages to email the register registers.
And I wanted to learn to take another one.
I take another one and I just name it as a login.
Right.
So I just simply name it as a logging.
And in our app name that is a logging app.
I have already finally Warrell and I just named that The Wall as a login, so I just simply copied it.
And now here I define as a login.
So now let's check this out.
If you click the save all.
Nostalgic or salver?
Yeah, or somebody is totally running, so now I just simply refresh it now, go to a logging.
Yeah, you can see now that the place logging and that is our user name field and that is our password
field.
And also here I define some of the placeholder.
You can see Stone showing out this placeholder name so better I want to make that thing.
So this.
And if you want to do that work then into the bootstrap.
I have also had the class as a firm control class.
I want to defining it.
Then it should be looking good, actually.
So now go to our logging e-mail and here that is our input feel into the input field area I want to
do in the front of the class.
OK, I just simply found the class and they have also into the bootstrap that have been in the class
as a form form control.
OK, just name it as a phone call toll, so now I want to do want to add this plus that piece.
I want to add diskless also for our password.
So here after this, I just simply pasted click as to save all.
Now, refresh it.
Yeah, you can see snow actually looking great and also there is a logging sabater for the logging I
want to do after that.
That means this is actually our button.
So after that, here I of the beer, I just simply defend that beer.
So now if you click on the save all.
So very close to now, just refresh perfect, so that is all user name and that is our password field
and that is our logging field.
Right.
So right now, if you make that as an empty if the logging then will be sure all the masses, because
of all here, I pulled that field as a record.
So now here, what exactly will be happen?
Like I have already created that user.
Right.
If you go to our I mean, I have already Curaçao the user.
So now here, if you put your appropriate username and password, then it will be rejected to some of
the base.
The for the reasons here, I want to do want to create another function for this one.
So if you want to create another function, we have to create this function in our view area.
So go to our project and that is our views.
OK, so in particular from right here, I want to do that work.
So I just create one of the other function and I just named that function as a part of what he wants.
Right now I am using the user and the login and then also you have to pass that request and make sure
you had that column.
OK, and also for this user logging, we have to do we have to create one of the another wall for this
one, because when this will be inserted, that means if you put the word appropriate username and appropriate
password and after that, if you click on the logging, then it'll be rejected for the base.
So that is the page actually have defined as a logging user.
So right now, all we have to do, we have to be around the world for this one.
So I just simply copy it.
And I just named that as the same name.
OK, whatever you want.
So if you want to change it, you can change the data that I'm using as a user logging right now.
So that is our user logging.
That will be our Warrell.
I have created the function in our views that our user logging and I just name it as a user logging.
So now here, if you want to access this function, if you want to access this function, we have to
add this function in this area that see in our username and password to have also defined all of the
action into the action area.
We have to defining it.
Right.
So for the reasons here, we have to do we have to go to our logging as HTML and here we consider the
cloud action.
So here I want to define our D.C. model.
So it's pretty simple.
I think you already know about it.
That is a waddill.
And then our app name, that means our name is a logging logging app.
And with this locking up, I want to go in Texas.
Our this name that is a bad name I have defined as use user logging site to simply copy it.
And here I just simply passed it.
That means when any user put that username and password and click as a logging, then our D will be
activated.
That means here have defined detection in our logging app and that is our user logging.
That means it should be redacted what you will, and that is our locking up.
And I have defined that name so that the logging user logging right.
So automatically this name will be redirected to our views and the views I have already created, not
the function as a user logging function.
So it subjected to particular that function area.
So into this function area, we here, we have to do have to define our, um, some of the condition.
So here I define all the if condition and if I define as a request that means whatever the request I
just pass from our logging is.
Tamalpais, I just simply defined as a matter.
OK, so here I have to define that matter equally.
Well first of all, or should we check as a post or not.
And after that also we have to define our field in our feeding them.
I have defined two of these or the user name.
So here I define that as a request.
That means with this request we have to pass all that our field that right.
Because here we have to pass all that our field equals to that of whatever the things we will put on
here, whatever the order for the password, we have to actually get all that our disposed data for
the reasons here I wanted to define as a user name and what this request I just simply defined by the
post and then I get our district startup, which is because the data actually comes from our we field
our filename.
I have defined as the user name.
OK, so if you go to that are logging here, you can say just simply defined that our filename.
So that is a clear filename as a user name and filename.
It is defined as a password.
Right.
I hope you will understand about it.
So I just simply defined as the user name and also we have to define the same things for our password.
So to simplify the password and then request and then will be as a post and then the get our password.
And now, friend, also, they have by default, because of all that is actually one of the frameworks
so into the framework they have by default, you will get some of the ready-Made models.
Now, we have to import all that, our credit model.
So here after this, OK, after this, that is our user info.
So after this, I don't want to define all of the form because here we have to add multiple some of
the things which is already building into the jungle.
So we have to actually call it right now.
So that is a Django and then the contribute will contribute and then the old in with this all from this
position, sorry, so promptly the all you have to define make the things are the import import into
the country, bought into the country.
But from here I want to do want to import some of the things as they authenticate every class is already
there.
DeMetz I right now I actually want to import it as authenticate, OK, authenticate.
And also they have also another one as a locking that is on a logging class and also they have another
class for the logout.
So I just simply take all the things from here.
OK, and also from also from our Django SCDP.
We have to also define our stepdads polygenic to say everything I will use.
Then it will be very much clear to you.
First of all, you have to actually get that all that means you have to put it simply defined as TDP
import and then SCDP and the response DEC.
So how can I love working with this redirect?
I will show you.
So everything will be very much is clear to you.
Don't worry about it, OK.
So that will be as a city response.
So to simplify this to the principles and also after that I don't want to define of the form and that
Django and Django and they have also that in our country country or out into the county board, that
is actually one of the other one as a decorator's, the characters from the decorator's.
I want to import that, locking the good import as a logging vehicle.
So that is also one of the very important one of the class.
So we will also use it.
So this will be also needed as a logging underscore reoccurred.
Okay, logging on Vescovi.
Good.
And also I want to take another one that will be as a Django and Django that you Ordos.
And then from here I want to import as a reverse.
Reverse.
Perfect.
So now we have to do we have to authenticate it.
That means here I have already found two of these are filename as a username and password.
So right now we have to authenticate it.
Right.
So if you want to authenticated it for the reasons here, you can say I have already import our country
hour or so from to the country, although I have already import our authenticate.
So with this authenticate, we can actually define our username and password is authenticated or not.
So we can do that work.
But I don't want to continue this process.
In our next video, I will show you how can authenticated the user and how can logging.
So thanks for watching.
I'll see you in the next video.