Hello, friend will come back in a previous video, we successfully designed our sign up form page,
so that is are all that filled the email, username, password and password.
Right.
And also that they are logging so long, we had to complete our sign up portion and also we have to
complete that logging option.
So if you want to work with this, first of all, what we have to do, we have to migrate that we have
to migrate all that our default database table.
So if you want to migrate it, what exactly you have to do?
I hope you already remember that part.
So here I have already download one terminal, but I did want to create another terminal.
So that is our main project into the project area.
I want to do it before my own to save it all.
And now I want to migrate people to migrate.
Then you have to write down the pie and the pie and then migrate.
Right?
That means our pie, manners, pie and the migrating as they enter that it will be added all that our
default table.
You will see that is all that our default table that is a default table is already initialized.
That means everything is not perfectly set it.
And also I have created one of them that is our app logging into the app logging area.
I also want to want to migrate.
It migrated so want to migrate it.
What exactly you have to do.
You have to write down the pie and then manor's dot pie and then make migration's make migration's and
then our app name, our app name app created as an app.
Underscore Locky no click as they enter.
So it's not showing that no change is detected and after that, I want to run out my grade again by
and the man is by and then my get no clinkers enter.
So that is all that are no migration's to apply because of.
Well, actually, I didn't create anything in our model that I have created.
The SO for the reasons actually is showing us a no.
So I will do that thing again.
So right now, first of all, I want to do we have successfully implemented all that our default best
tables right now.
If you want to access it, that means if you want to access our admin, that means that admin players
enter Algazi.
Right now you can actually access our D admin.
So I want to do and to create the super user.
That means if I want to access that our admin panel, then we have to create one of the super user.
Right.
So now let's do that work.
So you want to create that super user we have to write down as the pie and then manage by.
So it will be as a managed by and then our if you want to create that super user, you have to write
down and create.
Right.
Create super user and know how to do that.
Is your command as a pie managed by and the creators to produce not playing as they enter now because
it's not showing our default one.
That means that I'm just so right now that want to use our default, like then you can create a new
one.
I have already discussed about that.
Things with different now because they enter and there is an email, I name it as the admin at the Gmail
dot com and the password I put the password is you do me one, two, three, four, five and now click
enter that you do me one, two, three, four, five.
Please enter.
You can see something in your password that match better.
I make it again as you do me.
One, two, three, four, five and you do me.
One, two, three, four, five.
Because enter.
Yeah you can see our super user has successfully created.
So now if you want to access your database that means that being penalty is a refresh.
And now I have to make it as a Amjed because of all I name it as I'm just right.
So I name it as a by default name as Amjed that is my computer name.
I'm didn't put the password as you do me.
One, two, three, four, five.
Clinkers deadlocking.
Yeah, you can see now you can actually successfully logged in and here there is our database table
feel as it user.
So if you go to that user right now, I have all created one of the super user as Amjed right.
So friend here I want to do that will be one of the social media project for of the social media project
without any user create one of the sign up form automatically it will be created one of the profile
page.
That means this user profile.
OK, so who can do that work.
I show you.
So I hope you can well understand about it what exactly I want.
So when any user sign up from here or when any users sign up from this position automatically, it will
be created one of the profile for a specific user.
OK, that means you shall be created when the user and also we created one of the profile.
Saho can do that for doing this is step by step.
I show you I should be very much interactive.
One of the part like first of all, I want to create one of the profile that means our user profile
on the table.
So in our app logging, if you do create on the table, we have to work in our model site.
So with the model Sadiya, that is our default import models.
And also I wanted to improve our user class.
I have already discussed about the things we do.
So that is in our form and that is on Django formatted the Django than the concrete.
So from the country that the old and then models.
Right, there is a model from here you have to import our user class.
So first of all, I want to use it and then I want to turn to create another class for our profile.
So that will be the class and I just name it as the user profile.
OK, profile.
That will be the class name here I want to do it will be inherited our models.
That means our models and then model class.
Right.
That will be our model.
And then here I want to do want to take some of the field for this user.
So first of all, this will be connected with our user.
Right.
As I told you, when our end user will be created, this user related, our profile will be created.
So for the reasons I take, one of the variable is the user.
And then with all these models and then I want to create the one, two, one Felician, that means a
one to one field, OK, one to one field.
And I want to create that situation without which things I want to create relation with this user model.
Right.
So I simply add our user model and then it'll be just like the same as I want to add to the on underscore
delek.
That means whatever the field I want to create for our D profile, whenever this user will be elected,
this user related, every data I want someone to do and elected.
OK, so I won't name it on Dilek and on the left will be with our models.
Right.
With these models it should be as a cascade.
So I have already discussed all the things we do before and also from the person, the name for distillation,
you can name it with a related name.
Right.
That will be as a related related underscore name and I just name it as a user profile.
OK, name it as a user profile.
So will be as a user profile.
Perfect.
I hope you can well understand about it friend.
And then I want to add some of the field for our this user like here I want to add as a profile picture,
OK, profile picture will be needed also with the profile picture and then with these models it will
be as the image will type right is the image field.
It'll be as image field type and then where you want to upload.
So you have to add that other upload, upload, underscore to upload to, you know, which folder.
So here you have to declare that folder name.
So I name it as a profile of a profile piece with this.
So it'll be uploaded on here.
And also to do I want to make as a blank blank will be as a true sorry to your some blank will be as
a true friend and also to undertake another field.
So better upload to that means in our upload to folder should be created on the folder in our media
folder.
See to the media folder I have created on the folder as a profile pic since that means all that profile
related picture will be Saib in our particular this folder.
Right.
And also make the things as a true.
That means you will be not rekia.
OK, so that means this field is knowledgeable and then I don't want to take another one of the data,
but so that about this type of one of the name suits with these models, that means with these models
it should be as a dead field.
So you should be as a deck field.
OK, that means that is a clear on the date and calendar will be loaded in fundamental.
I have already discussed about the things we do.
How can I add that?
That will.
So first of all, I want to make that as a black OK, so I make it as a blank and blank will be as a
true blank will be the true.
And I make it as a null that Mr. will be a true.
OK, I mean, as a blank true and not true.
And then the will I take another field as a website and with these models.
With these models is to be as a website will be you are typewrite social because you are you should
that you are Oil-Field, you should be as you are a full type.
And then I also want to do want to make as a blank blank will be as a true OK shall we as a true.
And then I take another one of the Facebook posts if you want to, if you want to add multiple field,
you can add this.
So right now I name it as a with the models.
So with these models that will be the same.
You are well you are a full type and I make it as a blank.
Blank is equal to as a true be as a true.
I hope you can all understand about it friend.
Here I have created one of the class as a model area in the model I have created on the user profile.
So into the user profile as I told you.
And if you go to our view, seemed the view area before we successfully registered one of the user.
Right.
And here, as I told you, I want to do with any user will be registered and after that register, automatically
it will be created.
One of the profile that without all that field, the result, user profile.
Right.
So if you want to do that, work with the same time, then here we have to work like after that.
After the.
OK, here I take one of the another variable of the user and risk profile.
And with this user profile, I have already created our model name.
That is our user profile.
And I want to do want to access it.
So you want to access it.
First of all, we have to also load it, right?
That means here.
Here from from that is our app logging and from the app logging.
There is all models that is our models and from the models and want to input our class as a user profile.
Right.
So that is our app logging and that is from our models on the ground.
Important that we see our input this class.
So I import it so now we can actually use it.
So here this user profile here, I would want to use our this profile and this profile will be what
this profile will be here.
I have already created one of the user, so that is our user.
Right.
So this user, this user will be equal to our model in the model area I have already created under another
relation with our user class.
And I take that out all the time with this variable.
Right.
So this will be matched with our this user.
So it will be matched without this user winners will be match after that.
I want to do I want to save it.
That means after that here, I want to do with our user profile, with this user profile.
I want to do all the save this.
Our profile data or Kevin I hope is very much clear to you.
That means in any user will be created that we saw between our register will be as a true and also at
the time our use will be created.
And this user profile, I have already created that relation with our this user, so with our user model.
So with this user I have already connected.
You can see we know what the user and our user that is already user will be met, then it will be save
this profile, OK, and after that save here, I want to do and return it that with a return and with
the stop, with the stupid response to that I want to do in the past with the reverse and the reverse
area, it should be rejected.
Some of the specific space, OK, like kids will be rejected to be subjected to a logging base.
So this is the logging page on the rejected side.
Didn't create any logging base.
We have to create another another base for the logging that is general.
And also we have to create one that you want to look so better.
I name it.
That means in our app logging into the app logging, you are already out with our app logging here on
to create only wall path.
That means it will be as a, you know, app logging.
It should be to one of the logging, I name it as a logging.
So now we have to do we have to create it.
That means first of all, we have to create one of the base for our logging and then we have to create
one of the.
You are right.
So that means in our app, logging on to do and you create on the base and I just name it as a logging
icon, logging dot ASML.
So that will be our logging dollars.
Tamalpais and for accessing this logging Nortel's Tamalpais in our view area, we have to create the
function.
Right.
So now to do and to do that work here.
I create all of the function as a Dave and then I name it as a logging underscore for.
Base.
OK, that would be as a logging base and here also we have to parse that our request and then we have
to do we have to load our form right.
And or the form area.
I want to use our another class as an authentication form.
Plus, in our previous block project, I have already discussed about the things we do with these authentication
from we'll get our two of this field.
One will be as a username and password.
Right.
So first of all, if you want to use it, we have to do have to load it.
That means here.
So that is in order from that Django.
So, friend, I hope you can understand.
Everybody could see how much reality everything that these are from country and that they are old and
then the forms and sorry then the Fromm's OK, then the forms.
And from here I want to do an input on the input or one of the another class as the authentication form.
Right.
Remember, if you go to documentation and the documentation to have all of that class, I show you that
I have another class as this one you can see.
And there is authentication from that with the authentication from actually for the logging user in.
So with this, I want to logging.
So for now, that is Oxlade, the following of the class.
And I want to do I want to import our class.
Right.
And also this will be needed as a logging vehicle.
So if you want to use that logging detour.
So that is in our form.
That is in our Django.
I have already discussed about a lot of the time that is in our country and then in our art and in the
decorator's right.
That means the decorator's right from the decorator's.
You have to import our logging record.
That means a logging underscore and the required logging we get.
Right.
So now we have to do we have to access it.
That means our authentication form, I hope.
Friend in blogsite we did the same work.
Right.
We have to now do that things again, like there is a form and here I may meet our authentication from
that miserable condition, from classi loaded software that what exactly you have to do.
We have to put that conditions right.
That means that if and then with the request and then it should be checked, that mattered.
Right.
So with this method, we have to do we have to check it, as I told you before, friend, that with
this authentication from class we get to of this field, one will be as a user name and there will be
as a password.
So now I want to do want to add this for me now.
Are these logging rights into the logging area if you want to load that form?
So first of all, I have to do I have to check it.
That means that the poster get to first of all, I take it with the post.
Right.
And then undo and add that our form that means our D form.
And now here this will be the same as before.
So that will be our authentication from here we are here.
We have to pass that our request.
That means our request will be as a post.
Right.
So that will be the post.
And also here, I want to learn to take the things we do, not the variable, I take it, as a data
variable that is already requested.
This data, I want to save it, in particular this variable area that is our data.
And after that, what exactly we have to do.
We have to put that validation right that we the if sorry, if our form that if this form is valid is
underscore valid.
So first of all, we have to do we have to check it.
So here we have to check.
Right.
Then we have to check or we feel we have to check our username field and the password fields will be
just like that same.
I have already discussed about the things with your friend.
I hope this concept is very much clear to you.
So with this form, there is another function as a clean data clean underscore data.
So with this function, I want to get our wish field.
I want to get our database field as a username.
So still be as a username.
Right.
And also on the do to take another one as a password.
So that will be as a password and then it will be with our disinform.
So without this form, I want to do I want to use our same as a cleaned so that the clean data and then
the gaped sorry.
And then the get our field, our field as a password.
So be as a password.
Right.
And after that we have to do have to match it.
So take one of the variable of the user and then with our I have already loaded that is our authenticate.
Right.
That is a considered authenticate.
So friend, if you actually practice, everything will be more clear to you.
You can see the same procedure we just applied on here again.
So this user with this authenticated, shall we take our two of this field?
Our user name is appropriate user name or not, that user name should be equal to our user name and
same as password.
Password feel will be matched with our password database.
All right, so initially match, that means four initially match a name put on the condition if yuzu,
I take that things with our D variable as it user, right.
That is our variable as a user.
So if this user is not now is not is not none, OK, that if they have any user then I want to pass
it without locking.
That means without locking methode here and pass that request our this user that Mizuki's that user.
I want to do deposit Seafield to access that login.
You can see I have already loaded because I have already loaded our locking and the logout out.
So right now I'm using our this logging perfect and after that I want to do simple.
After that shall be returned and then SCDP with our EDP response to direct here and return to us with
the reverse here and pass out the specific base.
OK, so I didn't get any space.
So when created the needs to be addicted to like as a profile page or something, another space, because
I feel like we didn't create any home base actually.
So right now I make the things as empty.
OK, and then here it will be as a return post here.
Also we have to do we have to load our this locking this table.
Right, because in locking to stimulate area we have to pass out this form.
OK, so no one to do and returned with the render, with the refund and you can see how much easier
it is.
So if you actually know that basic concept, you should be very easy to you.
And the render actually pass to this parameter.
One is the request and the location.
So that is in our app logging into the app logging I have created on the page as a logging dot XHTML
and then also have to pass some of the data in our dictionary area.
So I pass that context and into the context dictionary here is in the past the same as the title.
You can send it, I name it on the key as a title and it will be as a name it as a logging logging base.
So it will be as a logging page.
And also after that I want to do and pass out this form.
And that means that the chloroform I want to do and the parts that form right down the path that form
in our displays that we are logging, that is Tamalpais.
OK, friend, I hope is very much clear to you.
So now we have to do we have to work in our logging.
So if you want to access that logging, I have already declared one of them logging.
Right.
Which will be our you are so you taxes that you are logging pays.
We have to play around the world.
That means in our app logging into the app logging, I would want to create another world.
But I hear you have to add that comma.
Right.
And then you know, I name it.
Our part will be as a logging OK will be the logging in our view area.
I have created the function, our function name for the logging as a logging base.
I name it as logging base.
And I also put that our name partner in will be because of all here.
I have already used that logging, so if you want to change it, you can change it.
So that will be our part, right.
That means here I name it as they are logging.
So when any user will be happy to sign up automatically, it will be created that user.
And also after that it should be created.
This user, one of the profile.
Right.
And after that, it should be addicted to our list.
Logging pays.
And then I have created another one as a logging soondae.
The logging area should be put.
It should be check out with our authentication form.
Our authentication form will be loaded and without indication for media.
I have already authenticate with this authenticated to match our what are the data I pass for this authentication
form that have the tuffield one is that user feel and the password Feleti should be checking that the
user is the appropriate user.
It does not and password is appropriate.
Password are not.
So shall we check it.
That means our database tableful it should we check and then it should be done.
Redirects to a specific sound the pace and then without pretending they're here, load our disk locking
that is HTML.
So now we have to do we have to work.
That means we have to load our form in our logging logging e-mail.
That means here.
Right.
So I want to do, I think the save all.
I want to continue this process in our next video we load our form in our logging.
That is Tamalpais.
So thanks for watching.
I will see you in the next video.