Hello, friend, welcome back.
In a previous video, we successfully lowered our home base and also we successfully complete our logout
position, right.
So now I want to do if you go to our base.
So now we don't need this, but I remove everything.
I don't want to make you confused, OK?
I remove everything.
So it's not apples to apples.
Deverill what exactly we did, we did our that is our part.
So into the pottery allowed our home.
Right and also if you go to our main Etoile into the manual that is our account.
So with these accounts I uploaded our app blocking you are if you go to our app logging into the app,
logging you or so that is our edit.
Right.
So in our view that means into the view area.
I have created one of the function name as the edit profile that means in our app logging.
And if you go to our view in the View area, I have created one of the function that is our profile.
Right.
And the profile I render our profile DOT estimates.
If you want to access that profile or the e-mail, first of all, you have to do we have to add that
account.
Right.
That means, first of all, you have to add that accounts and after that accounts, that will be our
edit, right?
If you go to our accounts.
And after that, I wanted to be dictator app logging you URL.
That means that is our app logging Eurail and then it will be added that in it.
And when it will be added that edit like I just click enter now can see so perfectly loaded our which
is still perfectly loaded our profile page.
So that will be our edit and that means will be the key to our view and our edit profile.
So that is our view.
And in our edit profile that is our function here and load our profile DOT estimates.
That means in our app logging, if you go to a template into the template, the app logging and into
the app logging, that is our profile of this Jammal Redfearn.
I hope now in particular this position, you should very much clear about it right into the app and
profile here and load one of the form.
So that is are all that from data.
So now I want to do I want to update it because of all here.
I didn't put any condition for the update.
Right.
So if you want to update it, then what exactly you have to do?
We have to work, in our view, into the view in this area that in our disk function area we have to
work.
So previously I get all that our data from our user profile and then also I load our form that is our
edit profile form and also add all that, our current user data that we can't use the instant data.
So right now, for this current user to have no data.
Right.
And I want to update it.
So if you aren't updated, each condition will be just like that.
Same before.
I think you already remember that.
But that means I put out the if condition.
And then with this request, it should be as a matter.
Right with this method.
First of all, it will be checked.
It is to be checked, that is post our gate method because of all from our form.
So that is a clear post.
Right.
And also to have some image stack.
So right now, that will be a first of all, until we check.
And then I take another variable as a form sorry.
It should be as a form.
And then I want to do with our discrete profile.
So we thought this added profile, this class with this class, we have to pass our requested post.
Right.
That means the request and then our request will be at the post.
And then also here, as I told you, when you pass any emails or when you pass an email, then you have
to also add that request as a file.
Right.
So now I want to do and to pass that request or request will be as a file.
So that will be as a file.
Right.
Make sure you added.
And also after that here we have to pass our current user data because of all that is all that our current
user right now, I'm already logged in.
So that is our current user.
That means disinvestments, current user data.
So now I have to do I have to pass it.
And I hope it's very much clear to you.
And after that, we have to do have to check it.
That means we have to check with our F condition if our D form E for this form is valid, is underscore
valid.
So first of all, I want to check it with the valid and then I want to do want to save our D form data.
I save it and I just make our comment.
That means it means it shall be saved, this data.
Right.
So I want to make it commit and commit.
Is it true that this is shall we save this data so it shall be saved, this data in our database?
And after that I want to do I want to load it.
That means when you update any website, any Facebook link, and if you click on the submit, it will
be redirected to the same page and into the same page area in value that we in particular this all that
input will value will be visible.
OK, that means it will be displayed all that our updated data will look.
So if you want to display it, it'll be just like the same.
That means again, it will be displayed our current user, all the value data.
OK, so I just simply update it and then that is our Endor, and also from here I pass that our form
I have already passed.
So here we don't need to do anything.
So what exactly I did on here, like I show you, if you click on the Save All, I click the save also
now and want to check our server server is totally running.
So now what to do and update it like I refresh this space and now here if you want to update.
So here's one thing like if you want to update it automatically will be updated.
Right.
And here right now if you want to update it, that means if you want to update that your data part,
if you want to put on the website of the post on their Facebook, and after that, if you click on the
submit it automatically, it will be updated.
But here one things like that is our profile picture right into the profile picture here.
I want to do it shall be displayed some of the default images fast.
And after that, if this image that this user want to updated that image, then he can update it.
So that will be just like our block BoSox.
So better.
First of all, I want to do that work.
Then I will check it.
Then I will show you how our all the current user data actually work.
OK, so that means that is a standard user and that will be our current user.
That means if you no.
Updated it automatically, it will be updated with our dislike that way.
So I show you first of all, I want to actually complete our disposition.
That means here I want to load one of the default image.
So if you want to load it, if you got your exercise folder in the exercise folder, I have already
loaded one of the downloader deputy better.
I copy it.
So if you go to our project, into the project in our media, I have already created the folder as a
profile picture.
Right.
So that is is for our if you go to our model into the model here, you can see I have already put the
our field as our profile picture and that will be as the may feel it should be uploaded to our profile
picture site.
That means automatically to be saved all the time or profile pictures in this folder.
So better I want to do unpaired some of the default images.
So for doing this, that is our Django project, that is a social media project.
And then go to our media and there is our profile picture.
So here I it.
So that will be our default image as a download Octopussy.
So now if you go and that is a project file, if you go open it, you can see so perfectly display out
this download Octopussy.
So I want to do a lot of visibility on the visibility in our I want the visibility in this menu area.
OK, so that is our neighbors.
That is our neighbor file.
We have to do.
We have to go to our neighbor.
That means that is our template in the template that is on there, but not as HTML.
So that is our home.
That is a logo.
We're trying to do undertake another one.
I take another one, so I put the bit in our left side.
OK, so here.
So that will be our image.
So right now here we don't need to put any links.
I make it as a now clean and here it should be one of the images that I take on the emails that will
be as a mistake.
OK, so better here.
I name it as emails that will be as one of the emails tech and the image tech area.
I have to do I have to put on the condition because of all here.
It should be displayed to different way.
When this user don't not have any profile image, it should be displayed by default image.
Right.
And also after that, when this user will upload this folder, that means updated this profile picture,
then our new profile picture will be updated.
So for the reasons here we have to do we have to display to have the on of this condition.
That means here that is our ally.
So here I want to do want to put that condition OK?
I want to put that condition.
It shall be better not here.
I want to put that condition in our area.
That means inside that L-A.
OK, so here I want to do and put that condition one of the if condition.
If our if you go to our user that means I have set up, I have set up our D profile being our model.
Right.
That means in our app blocking that is our model.
So the app model that is our profile picture.
So if you want to access it, we have to access it with our user.
And also I have created the name our with our user model.
There is our user profile.
Right.
So with this user profile, we have to do we have to access our this profile pictures I show you, like
I put it as a user, that means that user and with this user, then our relation name, our relation
name, I have declared it with our user profile.
So with this user profile, with this user profile, I want to access our this feel that is our database.
Our database field is a profile picture.
Right.
So I want to do and access it, I hope is very much clear to friend.
So user.
And with this user that is our relation name and that is our field name.
So when will we get an.
Then it shall be display our these dynamic e-mails and.
I want to make another condition.
It should be as a Ayles, OK, which will be as aless will be displayed.
Another one that means used to be displayed our default one.
And then we have to do we have to end it.
That means we have to end our condition.
OK.
So if this user had any emails in this profile picture area, then it shall be displayed or dynamically.
Miss Ilse's will be displayed.
Our default one seemed.
The default one would be.
I have already a lot.
That means in our profiles.
That is our download Octopussy.
So here I want to load our default one.
I want to put that link.
So here we don't need our the I want to do in our image area is to be displayed in our media.
Right.
That will be as media and then our profile that is available will be our profile underscore pieces.
That is our folder name and then that will be as a download and download Octopussy.
So it'll be displayed our D default image.
So here I put that link.
So that will be our default is right.
And I hope it's very much clear to you and elsewhere in this user updated that between this user have
already some of the images, then our dynamic immediately visible.
So here it should be display our dynamic image.
So it'll be display or dynamic image.
That means that the media sorry, with this media and then here it should be display our Tsim.
It should be displayed in our user if you go to our model.
So you have to go directly to user and user profile and then our film rights into the field area are
all that file is added.
So now they're going to add the same thing that the user and then our user profile and the profile picture.
So that will be as a user and then actually same like you will be same then our user user profile and
the profile picture.
OK, friend, I hope, is very much clear to you, so that is our default one and then that is our database,
that database image.
So here I want to on to pull some of the white hype for this image, rather then because of all our
neighbors, very small size.
So I put on the white, OK, that is a wide and the wide area.
And to make that as a pixel and make it as a 30 pixel sorry, 30 pixel.
And also I put all the height.
Height, height will be at the target because they'll should be also at the target and also for the
default one.
I also want to do the same.
That means here the to the white height for the limits of the target.
And that had to be so perfect.
So that's all you have to do.
So now let's check this out.
If you look at this table right now for this user, don't have any images, right?
For this user, don't have any image because of all I did an update, an image.
Now, if you look at the refresh, yes.
You can see finished no perfectly visible our default image.
So that is the things I added.
So that is the things I have added.
That means when this our user in our profile area don't have any images, then it should be display
our ale's option into the LS.
It will be displayed our default image.
Right.
So that is our default image.
And when this user will be updated on new image, then our database image will be visible.
So you can see snow perfectly now visible our default image on here and also into the bootstrap to have
another class.
As I told you before, there is another class as around that circle.
So now I want to do want to add this class because of all right, now we are using that one steps after
this, OK?
After this, I pulled on the class.
I put on the class and this class will be as a rounded look around it and then circle around the circle.
So now that is a class that's class.
I also want to add for our default one.
So that will be our default one.
Right.
So that will be our database one.
And that is our default also for the default one.
I also add that white hide and then our rounded class because of Savol.
And now if you yes.
You can see it's no actually looking great.
So that is our rounded circle.
So friend, that is our default is right right now.
I'm already looking.
So right now I want to do I want to update our image that fits the profile image and all that.
Now I want to update so you can update it like here I choose the picture now in our desktop and I know
how to do and to actually use this one, OK.
So I want to choose this one.
Click is open.
So that will be our new image.
And also I want to want to add our data bardzo because I want to use the step of one of the data, but
and also want to use on the website.
And then our Facebook friend, as I told you right now, what actually shall we do?
Like if you go to our view side of the barrier, you can see there is an instance, current user that
means this user already.
If this have any data like that, submit.
Yes, you can see from now our new image is updated, that means I have already declared that part in
our neighbor to the neighbor.
You can see I declared that part.
That means if this user had any profile in our into this database profile picture field, then automatically
it will be display our this dynamic pictures right.
To exist of showing our dynamic picture and also our is updated and also selected.
And then our Web site is updated and then it's selected and also same as our Facebook.
Right.
That that is selected because of all here.
Now it should be very much clear to you.
So now you can see I added was the wind our this comet that we saw in our this form that will be submitted,
that means we need to be the true then automatically it should be display out this instant current user
data.
So now can see everything is selected.
OK, so now I think is very much clear to for the reasons here.
I have added as an instance, current user data only visible as our current user data is visible.
Right.
So before, as I told you before, also was showing our Arkan's that Minnesotan's current user data,
that means now if you go to your home and from here, if you go to our, again, this account, that
means that is our account.
That is our account.
It so when be addicted to our account, it now can see that Miss right now actually is getting out.
This instance can do the data.
So that is our disinvestments guarantee that data is visible.
Right.
So now if you want to update like here, if you want to update anything, if you want to update your
Facebook and then if you click on the submit.
Now, Casey is not again updated, so I can update it and also it's not visible with our updated value.
So for the reasons here I name it, that means when this when again will be updated, then it should
be displayed again our this instant current user data so consistent perfectly with our current user
data.
So friend, I hope it should be very much clear to you what exactly the things I did in our D function
area.
So now everything is great.
So now you can update your profile from the disposition.
I hope you enjoyed very much.
So that's how you can updated your profile and also updated our profile emails in our next video and
to do and to create some of the table for our post.
That means that is our right and we have successfully complete.
So that is another application as opposed to the apples.
That is a model.
So now what to do and to create some of the table for our this social media post so we can do that work.
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.