Hello, friend, welcome back.
In a previous video, we have successfully created one of the profile based right and also here to display
our user name, email and your full name.
So that's all that our default, all that feel.
That means you are our user or all that feel to know how to do want to add another form for our user
changed form.
So as I told you, if you go to the documentation and they have all sort of the form that is our user
changed from.
So how can working with this user changed from in this video?
I will show that things with a live example.
So for doing this, first of all, in our social media, I want to add it.
That means I have already created one of the custom form in our app logging, and that is our custom
form.
Right.
Since the custom form area, I want to do want to update it.
So first of all, here we have to do we have to load it.
We have to import our D plus that is our user change form.
Plus I just have a copy.
And here after this I first of all I load it.
OK, so that is our user transform and then I want to do and to create another class and to create another
class for the change profile.
So I name it as a user profile change.
So whatever he wants right now, I name it as the user profile change and in particular the experimental
area we have to do.
We have to pass our this class as user changed from class.
I just simply passell OK.
And after that I want to do to create another class that will be as a middle class.
Right.
So I name it as a matter.
And the middle class area.
First of all, I want to load our model and the model that because I want to load our user model that
is our user and really user area, I don't want to add all the other fields which field you want to
update that in.
So you really want to change.
So I had all the other fields, so our fields I want to do I want to add our user name.
That means user name.
I want to change.
I want to change that email.
That is another one email I want to change and also I want to add another or all that field.
So as I told you in the user, if you go to a user model area here, they have some of the field as
username, password, email, fast name and the last name.
So now I want to do I want to take this as a first name.
I want to check that our first name, that they are first name feel and then the another one and another
one will be as a last name.
So I added as a last name and then our password.
So I added another one that will be our filename.
Our filename will be as a password.
Right.
So no I added our username, email, first name, last name and password.
So now we have to do we have to create one of the functions.
Right.
We have to create one of the function for our this user change.
So that is in our app logging.
And if you go to that view so after that, after the I to do and to create another function and I just
name it as ID Dave and I named that function of the user underscore change.
So that will be our function name.
And also if you want to access this function, this user must have to log in.
So for the reasons I added, as a logging is secured and then our function name as it user changed and
here we have to we have to pass that request.
Right.
And also here I want to do want to load on the form.
So for the resource here, we have to do the same things that we did before.
But here this change that between saw in this user wants to change this profile that already this user
is looking right.
So here we have to do we have to get our this current user user.
So if you want to get that current user, better take one of the variable.
I name it as a current like a current underscore user and this current user means or decreased.
So that is our request with this request, which user is already logging that?
That means our current user, I take it, without this variable as a current user.
So no end to want to load our form.
That means from and from I have already created the custom class, so that means in our form area.
So that is our user profile change.
Right.
So there is a class we have to, first of all, input it.
So I don't actually access it.
That means if you want to access it, first of all, you have to load it.
Let me see now from I have already loaded our sign up, so I want to do and add another one that will
be our user profile change.
That friend, I hope is very much clear to you.
So now with this hour, this class, with this class, I have already loaded our all that feels.
That means you should be loaded onto the field as a user.
Name the email first name.
Last name and the password, right?
So when I moved on it, then everything will be more clear to you.
So now with this form, that will be our user profile change.
That is our custom of the form.
And now I want to do here a little bit faster here.
So we pass our instant current user data because of, all right, now I'm already locked in and this
user already has some of the user name.
Right.
This user has already sent the user name.
It may also have some of the email address.
So for the reasons here, we have to do we have to add that instance.
So I name it as an instance.
So here I name it as a instance, instant and instant.
What instant that means our district is that that means which user is already logged in.
So this user request user, I take the things with this variable and here and simply pass it.
That means our into the formula which user is already looking and this user have some of the instant
data.
So I just simply take it OK.
And after that I want to do and put our if condition.
That means if our request method they shall be just like the same before actually method.
So this will be the request map authority.
First of all, it will be a check that is post methode or not.
So with this post methode and then we have to add again our form and our form and then our this form
will be our user profile changes right first and then here we have to parse that.
Our request, that means the request, our post.
So I just simply pass it.
And also from here we have to do we have to pass our instant user data.
That means which user?
This user already has all the data for the reasons here, we have to pass it.
Right.
And after that, I want to take that user.
Is that in this form is valid or not?
So I put as if our form, our form is underscore valid, if it's valid or not.
So I want to check it is to be just like the same.
If it's valid.
I want to save our this form.
I just simply said this form.
Right.
And after that, also here we have to do the if condition here and return a return on the render so
redundant it will be passed two of this parameter, one will be at the request and then our file.
So in our app logging into the app logging, I want to create one of the base that is in our app logging
here.
I want to create one of the file and I name it as a change profile change and a score profile, not
SDMI.
So that will be on the base.
I copy it.
So I have created the change profile, so I want to do and download it on here, you know, app logging.
I have created one of the page as a change profile of this HTML and also the result from I will have
to do I have to load our this user profile changes and take the things with this variable as a form.
So now we have to parse this form in our change profile or this stable pace.
So if in the past we have to proceed with that decision.
So just name it with the context and then add that the addiction into the dictionary.
I want to do all the parser, key or key is the form.
Sorry, our key will be our form.
So I simply pass our form right friend.
So now we can actually access our form in our Jane's profile of this.
That means that is our chance profile as HTML.
So I hope is very much clear to friend and also after that saved.
That means here when this user will change everything, when this user will change that profile.
Updated.
Then also we have to update our new data.
Right.
We have to update our new data.
And it should be said in our D user area, like right now, they have the I have already added one of
their user name as a test.
So if you want to change it, then you should be at the test one.
So here also you have to save this current user data.
So for the results after that save software that save here, we have to do we have to add that our form
our into the form area.
I want to update it in our profile.
That means into the user profile area here.
We have to update it, you know, this instant current user.
OK, so that means our new current user data will be updated.
So here, make sure you added and then I pass our form.
I just simply parsed that form in our context area and now we can actually access it in our change profile.
Not as Tamalpais that means here.
So this will be just like our home base, just like our logi.
OK, I just simply copied it.
And now here at Penn State, schools will be extended our basis HTML and also here I load one of the
forms for the.
I load that crispy farms and the tags and then are blocked, that will be the chains chains profile.
OK, we so the a profile sylvere the chains overlapping that user profile like a chance to use a profile
and then our body blog.
So will as our you can name it as a profile that user profile update or change the step up of the text
is to be visible and then that will be on the form.
It will be as a map to be post and also from our view, from the view like that form.
So now we have to do we have to use it so that they are formally loaded and also loaded that crispy.
And then there is a set token and then there is a button and button name will be as a change, I name
it as a button name will be the change and and form and then and block.
Perfect.
So now for I want this change profile.
I want to do want to create one of the you whatever that means in our app logging.
And that is what you are here to do to create one of the liberal antipasti, to still be as a change,
profile, change and profile.
And then in our view, I have created one of the into the view.
I have created that function name as a user changed.
So now I just simply add our view user change and then just name it as the user change or different
friends.
And now I want to do I want to create one of the button.
So in our profile pages here after this, I want to create of the button for the change profile, then
our DNA profile form will be loaded.
So for doing this, that is in our profile.
And there is a profile if you go to that, our view.
So into the profile I uploaded our app logging and profiler's to.
So that is our profile estimates after this here.
I want to do undertake one of the bracket first and after that bracket I take one of the areas and I
name it as a chance.
OK, so it will be the James.
Jane's profile in full, so they step up one of the button, it will be visible.
OK, so used to be a misplay as a paint profile info.
And also if you want to put that on the glass left in the bottom glass as a meeting between 9:00 a.m.
this morning, between between morning and between that and the small size.
And also I have all indicated on the road that I have already crossed the path.
So if you want to use it, you can use it.
So here you have to make that with that you are well, that means you are ill and you are Delirio.
If you go to our Wartell, that will be our apt name as a blogging.
Right.
So I just added as a blogging and then our equal part of the user changed.
So I just simply copy.
And now in our profile here after this, I name it as a user change and I hope is very much clear to
you.
So now let's check this out.
If you click on the Save All, I click here to save all Fosterville on the check server.
Yeah, you can see snow perfectly running and now I want to do I want to refresh our profile piece.
Yeah, you can see there is a clear pattern as a change profile in photo.
If you click on the change profile info, yes.
You can see friend know perfectly redacted to our change profile page and the change profile page area.
I have loaded one of the custom field that is are all that field because that is a user name.
That is the email.
That is our first name, last name and the password.
So now if you want to update your email address, as I name it, as a test at Gmail dot com and I put
as a Kassie and then last name as Arion and then that is a password.
Right.
So now I want to do I want to change that because I want to update our email address, first name,
last name and the password click the change.
Yes, you can see so perfectly updated and if you go to our profile, yes, you can see now it's visible.
Our email address and also visible our first name and the last name, I hope is very much clear to your
friend.
And also, if you go to our Jane's profile into the change profile, there is our password.
Right.
If you want to update that password for the password, they have the three different classes.
How can update this password?
In our next video, I will show you that things with a live example.
So thanks for watching and I'll see you in the next video.