Hello, friend, welcome back.
In a previous video, we successfully add our musician form and also from here we can insert that data,
right?
So now we have to do the same things for our album.
Right.
So we have to do the same thing because we have already created that is texture.
So we can do that work with using the copy and paste like here right now.
First of all, you have to do we have to work in our farm area into the farm area.
First of all, we have to define the class.
So we just like that same.
I just simply copied and after this I just simply define another class.
And now I want to do and define the class name as an album form.
OK, I name it as the album form and then it'll be just like the same.
It will be inundated with our forms, other forms.
That is our model form.
And then I just simply define as a middle class and all the models and I wanted to do to get all the
data from our wish table.
If we go to that model and to get all the data from our albums table right.
That means the album tables.
I just simply copied no go to our form here.
I just simply define what these models and our album and then I just simply defined that field.
I want to get all the data right.
So here I get all the data.
So now we have to do we have to work, in our view, go to that view and the view that is our musician
form and now that is our album form.
So this will be just like that same.
Right.
It'll be just like that.
Same so better I want to do I want to copy everything from here.
So I just simply copy it.
I just simply copy everything because here is a bit just like Samso here.
I just simply after this.
OK, so after this here I just have Lippestad.
Right.
So now that is our first of all, the form we have to pass our form names.
So here to have created this class.
So that is glass name as an album form.
So I just simply copied and now I just first of all, define the object for this album form.
And now with this album form, I have to do a project as a Post-it note.
So then I just simply define that as a request and that valid seed is valid.
Then I want to say that this data that is only inside this data into the database and after that it
should be also written in our index.
Right.
And after this also, we have to do have to pass notations that we define that things on here should
be just like the same.
But I just copied and after this I just simply proceed.
So here I want to do I have to pass our album forms I to simply define our album form into the form
so that we have to define all of the form in our album.
That means here.
Right.
So now go to our first step.
That is in our template, in the template that is are fast AB and that is our album.
That means that our album form.
So this form will be just like our musician that is a musician, but I just simply copy everything,
OK, or either then I just simply copy that form, I just copy it and now go to our album form.
And here after this I just simply passed it.
So be as a method will be as opposed.
And then here I pass our data, so I pass this data as the album forms, I just simply copy it.
So that is our form data.
So here I have to define the album form as the paragraph upright.
And then also I define that our a set of Tolkin and then the submit button.
It will be as an add album.
And then also I define the class for this one.
That means I have defined class for our D button.
So now let's check this out.
If you're not clear to save all, I just get to save all.
Now go here and go to the home.
And I go to that album, yeah, you can see is appropriately getting all that our feel, so that is
our album form and also you can see automatically getting all that our artist name right.
So I have already defined this step up one of the conditions.
So if you go to our models into those models, you can say I have already defined defined on the authority
of this musician.
That means if you go to our database in the database, automatically this.
So here they have also one of the ID.
If you go to our album and into the album, they have also one of the ID as they define foreign key
as the artist idy.
That means this artist IDs foreign key of our hour for this position to be decided.
Right.
So for the reasons here, you can see so perfectly getting our this artist Demps, all that artist name
is downloaded and there is a name, there is a release date and there is our all the list.
So here I have also defined sound the Afshan data.
So here, if you already remember it, you can see I have already defined some of the rating as a one
value, as a worst to value for the bad.
Not bad, good and excellent.
Right.
So that is actually all that.
Our value also is separately getting all the data.
But here our debt is not visible.
So if you want to display this data I have already discussed about that things with you, how can display
some of the calendar in particular that area.
So if you want to load the calendar, in particular, that area, I have already discussed about that
things with you.
Right.
So here now we want to do and to actually added so you can be added, you have to go to your farm area
and here you have to define that to be used for this.
Right.
So after this after this, I just simply define our filename.
That means that is actually our field name.
So this filename I have defined, if you go our album and you can see this filename as a release date.
So now I just simply copied I want to make this field as our date format.
So here I simply defined as is equal to and then our forms.
So with this form I define our time will be as a date type that in the date field and into the date
field.
I have to do I have to define that.
We get I have already discussed about that in situ.
I think I now can see how much of it is.
So with this we get snow on the ground to define our form.
So I just simply define our forms.
And this forms.
I define the text input, text input rights into the text input.
We have to pass our attribute.
So here at the WTI, it is so with this we have to pass it.
So here we d we have to pass.
First of all, the type,
our type and our type will be as a date.
So I just simply defined as a date.
Right.
So to simply define a date that perfect.
So that's all you have to do.
Now click on the Savol and now if you refresh it.
Yeah, you can see it's not perfectly updated, so now our calendar is now perfectly loaded, right?
So now we're going to do Mountain Saadet because here I have already defined all the parts in our view.
So here I have already defined our object as the album form.
And if it's valid, then I want to do and to save this data into the database.
And when I shall be Saib after that, it will be key to our index phase.
Right, that machine, our index function.
So now I want to check it like here I just select our Kazarian as a name and just name it as a check,
ok?
Name it as a jack.
And here I define that release date as a decision and I just simply define as a axilla and click as
the album.
Yes.
You can see it's perfectly in that data because of all we that or is not related to our in backspace.
So now if you go here and now if you refresh it, yes.
You can see the ID, the name release date and the number of visitors I have defined.
So that is actually the value.
So as I told you here, I have defined this value.
So this value actually saved.
Right.
So that we are excellent.
And for the excellent I have defined as a five below, I'm for the good.
I have defined that for value like I want to do and insert again go to our ADD album here.
I define that Michael Jackson and for the Michael Jackson, I name it as a hello, whatever.
I don't actually put out the demo takes.
I think you will understand about it.
I just believe and the release date and I just simply defined as a good click of the album go here browsr
it.
Yeah.
You can see it's not perfectly showing our artist idea as a one that is artistically added to and also
showing our release date and the check.
So also on to insert another one with our artist.
I do want that means if you go our musician into the musician ID, you can see that I'd actually won
that Kasie that Moscati for the one.
Right.
So that is a good idea, as I told you.
So we match with our deeside so no one to do and to insert another one go to home at Elbaum.
I do find a Kazarian and now I define as a test.
Define as the test.
Define that date.
Define that number.
We start click on the ad album.
Go here.
Our album.
Yeah, it's now successfully inserted and you can see also snowshoeing as an artist, ID as a one,
OK, that means this artist actually created this album.
So that is the album.
OK, so that particular album name.
So now I want to do I want to in our home base here is not showing all that our musician.
Right.
So here if you click into the musician piece, I like to here, if you click as a Cancerian, it'll
be the key to our adult profile pages and into the profile pages will be displayed all that.
Kazarian deleted all that album so we can define this.
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.