Hello, friend, welcome back.
In a previous video for our index piece, I have already created one of the applications in the application
area.
You will get one of the model, but when you create one of the project in the project area here, you
can see they have no model.
Right.
So for the regions here, I have actually transferred it from our main project area to one of the application.
So into the application area that is our models.
So into the model area by default, into the Dangote be imported one of the models.
So now if you want to create some of the database table, you can create this database table from to
this model.
So don't worry is step by step.
I will show you everything with a live example like here.
If you go to our homepage, that is our slider part and that is our about sections into the about section.
I want to do want to make that thing dynamic.
That means to have some of the title and also the of the description.
And here there is a short description.
And also here, if you want to display some of the images, then you can also displayed so better.
I want to create the table into the table area.
I want to add the three different models.
The part one will be as a title, one will be as images, another will be as a description.
OK, that will be the tree field.
So here, if you want to create it, then you can create it in our model area.
So into the index in the model area.
I want to compute it.
OK, so how can do that work?
If you go to Django official site, go to the Django project and then go to the documentation.
Here, if you start with the model, OK, so if you start with the model, then everything will be more
clear to you so that our models see the model.
Sylvere you can see, first of all, that are models generally being bought so that the models that
they follow on automatically added on here.
And after that you have to we have to create one of the class.
OK, so here you have to create one of the class and these models use models will be inherited our another
model.
So you have to also added that model.
And after that here you have to do have to load your all that field which field you want to actually
load.
So now I want to do and actually follow the same step.
So here after this, after this, I just simply create one button on the class.
So I just named that class.
OK, just name the class as about so I just name it as about.
And then as I told you, in this direction, it will be done with this model, like with this model
it will be inherited.
So it will be in another model.
So I just simply added that as a model.
OK, and then also after that I want to do want to edit the three different three different.
One of the field one will be as a title that image and the description.
So now first of all, I want to do under the title.
So that will be the title and this title that the register and or field, I just name it as a title
and then here with these models.
OK, so with this model you have to do we have to add your name that we feel type.
That means which type of field it will be.
OK.
That means here you can see that reflected our field type as the character field type.
So they have so many different type of field.
So literally in our next session, I will also discuss about more about it.
And also here you can add some of the argument.
How can I on the argument, how can at the Dale Field option field everything a little step by step?
I will show you, friend.
Don't worry.
So right now, just step by step, follow my all videos.
So here, first of all, there is our character field.
OK, it's also I don't want to create all that this type.
I want the character field that is our title field will be as a character field.
OK, so I just simply added that character field perfect.
And then how many character field it will be.
So here you can also add that maximum length.
So I just simply added that the maximum and you can also add that minimum length.
OK, so now I just name it as a maximum length.
So maximum land for our title.
I want to make the thing says it 100.
OK, and also in a lot of you we define as a nullable, right.
That means the field will be at a nominal.
But in Django there is a little bit different here.
If you want to display by default, that will be as a noun.
So here, if you want to display that, you can display with the blank.
Look with this blank and by default it will be the truth.
Right now I want to do and make that things as an animal.
That means here I want to do.
I want to make things as a Democrat.
OK, so for the reasons here I want to do and to make our animal will be as a false.
So here I just name it as a false.
So just name it as a false argument.
I hope everything is very much clear to you.
And then I want to do undertake another one as a description.
I just take another field or further field be description and with this model and also still will be
not the character field.
It should be because of a little description will be a little bit maximum size on a large size.
One of the takes.
Right.
So far they have also another type as a textfield types and I would love to use that text.
So that is our text field so that we as a text field and here also to add some of the maximum length,
OK, that is a maximum land for what this text field I want to do and to make that into the 800.
OK, and also I blank that means I want to make that into the record so that blank will be a default.
So I just simply make that into default.
And then also I take another field as the image.
I just simply edit that emails with this model, OK, with these models for the image type will be as
emails will types.
I just simply added as emails.
OK, that will be as easy, Masefield, and for the inmates feel here, you have to do you have to put
on a location that is where these inmates will be uploaded.
OK, so here they have also another one.
One of the function as a upload to say just simply that applaud upload underscore to that means upload
to which position.
Upload to will be uploaded one of the for about I want to do and each will be created along the folder
as a about folder and the about folder.
It'll be uploaded all that file.
OK and also on to make the Princesa record.
So here blank blank I want to make as a false social B as a false and here one thinks you have to remember.
So here I have used one of the e mails type.
That means the image will type.
And here I added as they apply to it will be uploaded about that means about folder.
So if you use that upload tool.
So that is one of the Python I library.
So if you want to use that image, Labidi, then you have to do you have to install one of the packets
like they have one of the packets as a pillow.
So with this pillow you can actually working with the images.
So here you have to do you have to install it?
OK, that means that means you have to install that pillow back.
So if you want to start it, you have right down the pipe that the people install and the pillow.
OK, so that will be as a peep installed pillow.
So that is actually the common line with this.
You can actually install it right now if you can enter.
So it may take a little time.
Make sure you're connected to the Internet when it to be downloaded.
OK, but here you can see already showing as a record, already satisfied.
That means that I have already installed a pillow in my system.
So for the reasons you can see, it's not showing as required.
Already satisfied either.
Then it should be take a little time for download and install it in your system.
So make sure you install that pillow.
That is a pillow install that the being installed pillow.
So you will be supported our this upload to like and dislike the idea automatically.
It should be created on the folder as about OK, so here I have already successfully installed it.
So right now we don't need to install it again.
So and I hope we can all understand about how we can create some of the model.
So here I have created around the classes about and in particular this about a year I have added three
different table.
Right.
That means a table filled OK, will Terrilyn will be as about and then our table filled them will be
as a title description and the images.
So here I have added it.
So now I just click the save all and now if you check your server, everything is running well.
So now we are ready to migrate.
So better.
In our next video I will show you how can migrated before migrated here.
Also you have to do we have to actually register it in our admin area.
That means when you create this table automatically, it should be visible in our admin area.
So how can do that work?
Well, don't worry.
I mean, our next video, I will show you that things with a live example.
So thanks for watching.
I will see you in the next video.