Hello, friend, welcome back.
In a previous video, we have created one of the application for our contact, right?
And now in this video, I want to do I want to make our this part as a dynamic.
So that is our contact base here.
First of all, if you want to do that work, we have to do we have to create one of the model, right.
That is we have to create the model class.
So, no, simply do that work.
So right now, that is our view.
That means our contact view.
That is already what is right.
We don't need this.
You order.
So that is all manual.
So that's simply remove it.
OK, so into The View and here the contact that is our models into the models area.
I want to do want to create one of the models seems to be just like the same that we did for our index.
If you go to that our index model so that the index model here considered one of the class.
So now here I want to do a digital copy it.
So I just simply copied and now in our contact model here, I just simply passed it.
OK, so I just simply paste it right now.
We don't need this.
I just simply remove it.
Perfect.
So now I want to do to create one of the class name and I just name it as the main contact our eye contact
list.
OK, just name it as the contact list.
So this step up, one of the class I have added and which will be model and then it will be inherited
our main model class.
And now I want to do here I need one of the location that is the address, email and the phone.
Right.
So I just take one of the field as the address, OK, address and then also be the email and then also
another one I want to take as a form that is a font.
So our atmosphere will be as a text type that the text feels right so better that will be as a text
field and that will be as a character field that the email will be as a character feel.
Right.
So TextField, I want to turn to that land will be as a standard.
And for the email I make that will be maximum length will be as a one hundred, OK.
And also make the things as a blank, false, blank false and a blank false and also for the form it
will be as a character field.
So I just simply added the character feel here, we don't need this better.
I want to do and copied and pasted.
OK, that means the phone with this model.
It will be as a character fail and maximum land for the phone.
I just added as a node 100, OK, and then blank will be as false.
And also to the self area here.
I want to display that email.
That means the email field will be displayed right with the self.
I think family will already know about it.
So now I just simply add it.
So now if you click on disable, so after that we have to do we have to migrate right into the migration
area and appear on the magnet for all this contact list.
So if you want to do that work, first of all, you have to go to your appropriate file location.
And then I just simply added as a python and then mayonaise dot by and that make migrations, OK, that
is a python madness dot by and migrations.
And now if you click on the enter.
Legacy is initialise our migration file, that is our contact, that is a contact list, and after that
I want to do I want to migrate it right.
So if you want to migrate, then what exactly you have to do?
You have to write a python and then man is not pie and then migrate.
So that is our migration, our own to do and to migrate it scientifically as if enter.
Now you can see our migration is successfully done.
So now if you click on the Savol now if you go to our database and now go to our home and here you can
see it's not showing our tourbillon here because of all I didn't add it.
That means I didn't add our this table in our which place?
In our admin place.
Right.
So here we have to do we have to add it.
So like if you go to our index had been so posted, it will be just like the same.
So I just copied and here I have to add it and also I have to add it.
So no, I just simply added so that we don't need this.
So Fran, I hope you can all understand about it what exactly you have to do.
So in the contacts, that is the same model.
So from to the model Syria I have into the model I have created from the class name as a contact list.
So now I just simply loaded our import our this contact list plus.
Right.
And also into the admin side and the register in the register area.
We have to do we have to actually pass it as a contact list.
Perfect.
Now if you click on the table and now if you go outside, that means the admin click is a refresh.
Yes.
You can see friend.
So now that is our application name.
That means I have created one of the application name as a contact, and that is our table.
That is our contact list.
So if you don't open and click as they add new contact list.
Yes, you can see that is our address.
That is our email field and that is our phone.
So not only do I want to actually update, so I like here and there.
It will be our address.
I just simply copied.
So just simply pasted.
I just make that user fast.
Then it should be understandable.
That is our address.
And then I pulled one of the email addresses of support.
Sorry,
support at the rate is eLearning dot com.
And then I just pulled some of the email and phone number.
OK, that will be our phone number.
Now I just simply save it.
So that is data and it consists of showing our email address.
Because of all I have already admitted that machine our self into the self here.
I added our email.
Right.
So far the results are consistent, showing our email.
So now I want to do an actual visible over this data.
That means this address, email and the phone number I want to do and the visible lead in our place
in our contacts that area.
So if you want to display it.
So here I have already loaded I have loaded out this file in our view that we will contact you.
So that is our contact view.
Right.
So here we have to do we have to load it, which will be just like the same before we as I told you,
we have already complete our main part.
So if you go to our index and with a view area, so first of all, here you have to do we have to input
our class that from the model.
So for now, I just simply pasted that means from our model.
That means from our contact and from the model.
So from the model, I want to load our this class as a contact list.
So now I just simply load import our this contact list.
Right.
So now first of all, with this, we, I want to do want to get all that our database data in our database
here.
I have already sat on the data.
So now I want to get all the data.
So if you want to get that data, just like they have only one road that I want to get.
So that is our zero index data.
Right.
So now I want to do that.
Work through will be just like the same in our index.
That is closer to the request, the better.
I just simply copy it.
OK, I copy it.
And now I'm here after this.
I just look past it.
So here it will be the same friend that will be as a contact list.
I just name it as a contact list that starts right now.
We don't need this.
So that will be our contact list and enter the contact list.
That is our model M, our model as a model class name and the contact list.
And then I want to get all that our object data.
And also here I added our resident index data because of all that have only one data that zero index
for this index data I want to get.
Right.
So I just simply added our zero index and also into the context area we have to do here.
That is our decision and the area.
So right now they have the only one.
OK, so I just simply take one data.
So that will be our key.
I name it key as a contact.
OK, contact Maine or contact list and name it as a contact list, then it'll be better.
And I take the things with our list contact list data.
So now here I just simply pass it.
And also we have to pass our discounters data because of what I get all the data and take that thing
with this variable.
So now we have to pass all the data in our specific this contact list.
Right.
So if you want to pass it here, I have already added addiction and I just take the things with these
variables.
Now we have to do we have to pass it.
So now I just simply pass it.
So I just simply pass our containers that are in our contact orders.
So now we can actually access our contact orders.
Temel, that means here we can access our all the data without this contact list.
Right.
So now I want to do that work for doing this.
If you go to our contact, that means the contact orders, the will go to our template and then our
contact orders.
And here you can see that the location that is the email and that is our call.
That means the phone.
So now, first of all, I want to display our location.
Let me the address.
So with this so here, if you want the visibility, you have the visibility with our this contact list.
Right.
So now I want to do and do with this contact list.
With this contact list.
I want to do want to display our address.
That means if you go to our model so that our full name as the address, email and the phone.
So no, I just simply loaded our address and same as for our email.
So that will be our email and that will be our phone.
Right.
Sorry, that will be our phone.
I just simply based it.
OK, that will be as our email and then our phone.
That will be either email and that will be our phone.
So simply it perfect.
So that's all you have to do.
So now let's check this out if you're going to disable.
And now, first of all, I want to check our server.
Yes, everything is running well.
And now if you refresh it.
Yes, you can see it's perfectly getting our address is perfectly displayed.
Our e-mail address and also is showing our phone, I hope is very much clear to your friend.
So now here I just make out this part as a dynamic.
So evident actually now comes from which place comes from the WFB?
Are the index want that index zero?
That's right.
So that is our index zero.
So from here I get our index data and I just pass it to our contact on e-mail with this context.
Right.
So here I added addiction and the traditional area.
I pass our key and that is our value.
So our value is I get all the other object that to take the things with this variable and I just pass
it.
So now we can if you want to display it, you can display with our D contacts list.
So right now you can see it is a contact list.
So here I just simply pass our contact list, address our field name, email and phone I hope is very
much clear to friend.
And now we can successfully did that work.
So, you know, next video I want to do, want to insert the data from our list from OK, how can insert
this data in the next video?
I will show that things with a live example.
So thanks for watching and I will see you in the next video.