Hello, friend, welcome back.
In a previous video I have already discussed about that, things we do, how can create all the models
and also after that we migrated.
That means we have already created all the database and into this database we have created two of these
are the best.
One is our model.
Another is our album.
Right.
And also into this musician, Debbie, I have defined three of this field.
One will be as a first name, last name and the instrument.
So now I want to do and in fact, some of the data in particular this all that field.
So if you want to insert it, you have been studied by the object.
That means when any data will be inserted into this database, all the field, it will be inserted by
the object.
So everything, as they call it, objects.
And I want to do to add sound the object in our name field, know a last name field and also the instrument
field.
So how can do that work?
In this video, I will show you that things with the live example for doing this.
First of all, we have to do we have to open our terminal, so just open our terminal.
So that is our project directly.
And this project is truly first of all, we have to go to our shell like here.
You have to write down the python python and then you have to define a demoness by Nannerl dot file.
And then she'll say just simply defined as a python, Amandas fi and the shell.
So now if they enter, so now you can see snow redacted to our database.
Chairlady that means with the shell here, I want to insert all the data in our particular this all
that database table.
So now here first of all, we have to do we have to import our all that models right here in our files.
Tap into this.
Fastweb, I have defined our models into this model that is our models.
So now, first of all, you have to do you have to import it.
So if you want to import it in particular, that's your area you have to define as a from that means
from where it will be inserted from our this step and with this step that is our model.
Right.
So now I just simply defined as a fast like a fast underscore ab our Folden name and then into this
holder that have also the model.
So I just simply defined all the models and found to these models I want to do on the import side are
simply defined as import and import.
Our that I want to import our this class.
That means our this table, our table name as a musician.
So I just simply defined as a musician.
Musician, good friend, I hope it should be very much clear to you also from our staff, from our Fastweb
models, I want to import our this table that is our mediation table, say, to simply define our mediation
table.
So here, if you want to add multiple feltlike here, if you want to add the multiple table, then you
can also defining it with the comma then album.
So this type of things you can define.
OK, so if you want to add that multiple table, then you can add that they belong here.
So right now I only want to do one thing.
The data that means our object, you know, our musician that this musician tables right now.
It's OK with me.
So if you click as they enter now, you can see snow redacted our main area.
That means you our mediation area.
So now, first of all, I want to check it.
Is there have any data is already added or not.
So if you want to check it, it's pretty much simple things like just simply defending the print.
OK, just being able the P.A. down the check it in our musician into the musician.
I want to check all the tower objects.
OK, just simply defined as objects and all so objects, all the data.
So first of all, I want to check it every piece that have any data in this table, that means musician.
They will not see, as I told you every day.
It means that actually objects.
OK, so here I just simply defined as a preened in our musicians table.
I want to define all that objects.
So here I just simply defined as objects and all the data.
So now if you click on the enter now he is not showing as a blank.
That means here right now I don't have any data.
So no, I want to do I want to insert some of the data.
So if you want to insert it like here, I define as the object one of the variable.
OK, so I just simply defined as object, one of the variable.
And here with this in our musician there will see that this musician table, I want to define all that
our field.
So right now, our field them.
So our filename as a first name, the last name and the instrument.
So now I first of all, I want to define the last name.
OK, so you just simply defined as a fast make sure spelling is correct so that they are fast and good
name, because that's all that our database will name right into this first name here.
I do want to define that first name, so I simply defend that first name like the Gazette.
OK.
And also after that, after that, I want to define another one better here.
I want to define our another field or another field as a last name, last underscore name and for the
last name and define another name.
So shall be Azarian.
OK, Ghazarian.
And also to have another field, another field, our field name as an instrument.
Right.
That means that instruments here are defining it.
So into this feed here, I want to define that instrument name will be as a guitar.
OK, just name it as a guitar.
So friend, I hope you can understand about it.
So I just take out the object and into this object in our in our musician table into this musician to
be our first name into this fascinating mountainside that Karzai and into this last name.
I want to insert that as a Karzai and the instrument here.
I want to start as a guitar, OK?
So here I want to insert all the data, you know, at this table that the musicians table.
So now if you click as they enter, so now we have to do we have to save it.
So here I want to save this object data into this database table.
So if you want to save it, then you have to define the object.
And into this object, I want to save all the data.
I just simply say, OK, click, enter.
So now you can see if the data is safe in our database table, that means information.
So don't want to do and to create another object.
I want to create another object and I also want to insert the data.
So but I just simply defined the same things as the object.
And then in our musician into the musician, I have to define our fast playing field.
So here I define as a fast, fast underscore name.
And for the first name I want to define as a Jack and Jack and also, you know, last last name field
into the last name field.
I want to insert our another data here instead of the Jack Ma.
OK, and then also after that, I know our instrument field, instrument field in the instrument field.
I want to insert a civilian equivalent.
I just simply defending the violin.
So this step up, one of the data I want to also inserted in our musician table.
So that is our first name field.
It is the FastLane value to be saved as a Jack and last name, which is the same as a MA and the instrument
that I a.d.a you M.B.A..
M.A., perfect, and then here I also want to insert our common name as the violence, and I just click
on the enter and now we have to do we have to also save it.
So I just simply defend the object.
And when did this object that I want to save it.
So I just simply defend our of the data and save it.
Perfect.
So not only if you want to check it out, all the data is successfully inserted or not.
If you want to take it like right now, I want to paint it again.
So before I have already checked it.
So, you know, shortly before issuing showing us the empty to No.
One to check it again.
So I just simply define our musician be.
Into the musicians table, I want to check all that object, OK?
Objects and all sides are simply defining it.
So preened our musician table into the musicians table.
I want to check all that objects.
So I just find as objects all.
And now click on the enter your eyes and I'll kiss your friend.
Now it's actually showing our data.
So before that was display as the empty.
Right now I have already inserted two of these data for the reasons here you can see snowshoeing as
a musician, this object one and the musician object too.
So here I have been added to this data.
So now it's perfectly display on here.
That means we successfully added our all that object in our aspecific this table.
So here, if you want to visible, you're all the data that is here.
I have inserted that Karzai guy.
Having said that, Karzai Orien and the guitar and the Jack Ma and the Valliant.
Right.
So here, if you want to actually display these dots right now, because it's not only showing that
objects that have one object, there is now the second object.
But here, if you want to display your all the data, then you have to you have to update it like,
you know, ah, that position here in particular, that area you have to update and other options like
assembly the of the drive.
So you do this Jeev here you have to define as is.
OK, that me, the SDR and with this is here you can defining it.
I just simply define that on a selfs I just simply defined as self.
OK, so with this self you can actually display like here I just simply defined as it all returned and
with the self, so with the self.
I want to display our place that I want to display our first name.
I want to display that first name.
And after that I dissembler definitive blah's.
And then here I just all the spaces.
And after that I also want to display our last name.
So our last name will be that D1 field name.
So I just simply defined the last name.
OK, so you want to display it before display that last name.
You have to define that self.
So I just simply defend itself.
Sales dot all last name perfect.
So I just simply defined as a dev and with this, starting with the system, one of the one of the four
function with this here I would define as it is self and then return self our first name.
So we shall be display our first name.
That means FastLane Field Data and also under define another one as a last name field data.
OK, so now I want to do and to save it I just click on the Save All and now let's check this out.
And as I told you before, if you change, make any changes in your model Sadiya, then you have to
run three codes.
Right.
So now we have to actually run it again.
That means we have to migrate it again.
So first of all, from here, I want to accept this.
I just simply exit from here.
OK, so now that is our project profile into this project folder here.
I have to run our same code again.
So as the python, Manning's dot fly and then migrate.
So don't click as they enter.
Yeah.
And then after that we have to run out another code as a python and then our managers start phy and
then make migration migrations to the make migration.
Our first steps, our first step name as a fast fast underscore app folder.
That means that is our faster folder.
So the assembly defines the python manor's dot file and the migration's OK migration's and then fast
step because the enter.
You consistently showing that no change was detected in our app, that means fast app, and after that
we have to also download the same code.
That means the Python manison migrates.
I just simply defended the Python managers dart, FYI.
So it's pretty much common knowledge of the code.
You have to remember it, OK, they just simply migrate are pretty good.
So not legal to enter.
So here I migrate our database, so now I want to do and rejected our sale again.
So if you want to go here, you have to define as a python, right.
Python and the man is dot fi and then shell you're going to enter.
So now we are into the shell area and into the shell area.
First of all, I want to import it.
That means import our musicians.
I just simply different from what I have already discussed about the things we do from our Whitstable.
That means from a rich folder, our Fastjet folder.
I want to access this models and these models.
That is our table name as a musician.
Right.
So I just simply from our fast, fast underscore app and from our fast app ideas and different models,
OK, that means in our fast app and that is our models into this models.
I want to be imported fast.
So I just reimported in or out from here.
I want to import our disposition.
So I just simply define our musician table.
So noncyclical to enter.
So now we are in musicians and I want to print it.
So I want to print our our musician, our musician table and all that objects, objects and all so and
to now print it again.
That means that print in our musicians, all that object I want to display.
So now if you click as they enter.
Yes.
Now can see friend now perfectly display our name.
That means for here in our musicians table I have inserted on the Algerian because of all here you can
say only added our first name and then espace our last name.
And here if you use that instrument then also it will be visible.
So right now I have only defined our first name and the last name.
So now this is not showing the Kazarian.
And also I have save another data as the checkmark.
I hope it's very much clear to your friend Zino.
Next, we do want to discuss about that admin side.
So by default, Django providing some of the admin panel's next video.
I will show you how can locking into this admin panel and how can read all this data so every data will
be saving our database.
That means our backing.
So how can access your at being in our next video, I will show you that things with a live example.
So thanks for watching and I will see you in the next video.