Hello, friend.
Come back in a previous video, we successfully make and work on taxpayers this position as a dynamic.
So now every hour address that email address and the contact.
Everything actually comes from our database area.
Right.
So now in this video, I want to do on two inserts of the data like that have one of the form.
There is an image that is a name that email the subject and the message.
And after that, there is a same message.
Right.
So how can insert that data in this video?
I will show you that things with a live example for doing this.
First of all, we have to do we have to work in our model into the model area.
We have to added our one of those timers, like, I don't need this.
Like that is our view better.
I just clean everything.
Then you don't need to be confused about it.
OK, so like there is a portfolio that is an image index and there is a contact to the contact page,
go to the contact models so that the model year before I have created on the glass as a contact list
right now to do and to create another one.
I just simply copied and now here I passed it.
So now I want to do and to create one of the contact form I just named one of the class name as a contact
contact form.
OK, I just name it as a contact form, one of the class and then it will be inherited on models and
that is our model.
And now here we have to do we have to have some of the feel like that is our name, that is our email
subject field.
And then Marsfield.
So they have the farfield so forwell will be needed.
So I want to do better.
That will be the TextField.
So TextField will be needed.
OK, so I just got it.
That will be needed for our masses actually.
And then also I take another one, I just name it as a first of all as a name.
OK, that means the name and the email subject and the message.
So I just name it as a name email and then the subject and then the message.
OK, so now for the name that is our models, that character field maximum lane for the name.
I just stared at the one hundred one hundred for the subject I make as a 400 and for the message is
it will be 800.
Perfect.
And here I want to display our to the self here.
I want to display that name.
That means that will be displayed that our contact form name.
OK, so I just simply loaded so far and I think it should be very much clear to you everything I already
discussed about a lot of the time.
So that is our class.
And here there is are field because of all into the Farfield area.
You can see they have the four on I inside that data.
So after that, what exactly you have to do?
The same procedure will have to flow.
After that we have to make migration's that means here in particular, that portfolio folder area.
I just simply added a piece, a python and that man is taught by and then make migration's right.
There is a python managed by and make migration's now click as they enter.
Now you can see it's automatically created our model as a contact form.
That means in the migration area you can see the clock on from perfect.
So after that, we have to do have to migrate it by Thomas.
Sorry.
Here it will be the python and managers dart by and that migrate not enter.
Yeah, it's migration is not successfully done.
So now if you want to it in our admin area we have to do we have to start it in our admin.
That means your contact.
I mean here I just simply pasted and here I just simply pasted so into the models.
That means, you know, our contact models and that is our model sorry, in the model area.
So if the model idea I have created one of the class as a contact contact form.
Right.
So now into the admin area that will be as our contact from class and also registered it as a contact
form.
Perfect.
So now if you click the save, all note should be visible in our admin, like go to our home.
Yeah, you can see the contact application area.
I have created two of this table.
One is our contact form table and there is a contact list.
So I have created our contact forms.
And now if you click the add new.
So now that the forcefield as a name email subject and the message.
So now I want to do when any user, when any user input that feel that means put that name, email subject
and the masses and after that one it'll be at the same message, then this data will be safe in our
particular that area.
Right.
So you can do this work is step by step, I assure you.
So for doing this, we have to work in all this contact form.
So now go to our contact base.
That means that is in our template into the template and that is our contact.
All right.
So now we have to do we have to work in our form.
That means here you can see that it is also one of the forms.
So right now, that is our method.
That is post method and actions.
Right now we don't need any action.
By default, it'll will be the to our same method area.
So here also, you don't need this.
I just simply removed it.
Plus that is all that field.
Right.
So here that is the input field and there is a name and also they have some the day tool.
So we don't need this actually.
OK, but we don't need this.
I just simply we will be dedicated for the team of the class.
So right now we don't need this we bit and also here from here a bit.
And that is a placeholder for the message.
That is the role where he could and I say that was the message we don't need to I just simply remove
it.
OK, so I make the things we move and now that is our placeholder.
So that is all that our feeling in our film name as a subject will name as a message for name as the
email, and then another one as a name.
Perfect.
So friend, when you work with or any kind of form into the form media we have to do, we have to add
on the CSIRO talking, OK, that before in actually any post is happening, that means when any post
is post that prompted from media then automatically created on the token.
So for the reasons here after that from in particular that area we have to do we have to add that to
a set of talking like a c s c srf underscore token.
So make that sure you add that, OK, without this, that means without this sort of token you cannot
insert any data.
So for the reasons here, I just simply added that casarett token.
So now if you click as a Savol, I just click the save all and now if you refresh it.
Yeah, you can see snowshoeing as a loading message saying thank you so that I also some of the massage
maybe, and also I just remove all the glass from the front for the reasons here you can see our button
is actually not getting that glass, that middle class.
So here you can see actually there is a cladding and there's the message right now.
We don't need this dip.
So I just simply remove it, OK, and it the bottom area and put some of the glass.
So that is actually our bottom.
So here I want to do and add on of the class.
I added one of the classes a bit and we didnt success OK between beauty and success class.
Now let's check.
I just click to save all and now refresh.
Yeah, because it's perfect, so there's a cloud between between us, so now I want to do I want to
insert our this form data, right.
So now that is our form.
You can see that is a clever form and that is all that our field.
So and also in the form area, that is our action.
I make that things as the employee.
So initially as the employee, then automatically that is our contact with.
Right.
So automatically subjected to our view.
That means in our contact and the contact that is our view automatically will be added.
And that means you should be getting our TS metadata.
That means this function data, OK, you should be connected to particular dysfunctionally seemed to
function the area before.
I have already passed our list.
Get all the data from our contact list right now and want to work for our contact form.
That means this form data.
OK, that means when you insert anything from our this feel, that means the email field that is our
name field subject field masses field automatically.
Shall we get that action is when it will be empty.
It should be redacted to our this application, this application, this view and that is our default
one.
So automatically to reject it or this area because of all here you can say load our contact list.
So now we have to do we have to work on here.
So if you want to do that work, first of all, I want to do I want to add one of the if condition and
if this is condition, I make a direct request.
OK, that means that with this request and the request area, we have to do we have to add that method.
That means this request method, OK, this request method.
First of all, I want to check it with that.
I want to check it.
It's post method or the gate method.
OK.
So here you can see the regular post pattern.
So first of all, I have to do I have to actually check it that the whatever the request, I just pass
from here.
So from here automatically it should be elected to our this matter area.
First of all, I want to check it.
This method is post method or the gate method.
OK, so first of all, it will be checked.
And then after that they have also the column OK with the column area.
And after that here we have to do we have to pass all that our field that means in our model into the
contact model here.
Considering all that, I would feel as the name email subject matter.
So here we have to do have to pass all the data.
Right.
So now I want to do I want to work.
I have to work.
In our view, that means here I just named one of the variable for the name I just name are the variable
as a name.
Whatever he wants right now for similarity.
I name it as a name.
OK, and now with this request, that means that the request with these requests will still be the post.
So this post, I want to get all the data.
OK, so I just simply pass it.
I pass it in our name.
That means whose data I get.
I want to get it from our D fill them that with this input feel like this input filename as a name.
So I just simply name it as a name.
OK, so whatever the data I just pass from this input field.
First of all, I want to get that data right.
I hope it's very much clear to friend.
So now we have to do the same things for the rest of this.
So that is another one.
So another one is the email, OK, and then another one will be as email and I just take of the variable
name as email.
So as I told you, what about the things we will put on here.
It's probably OK, OK, that is actually one of the variable.
And also there is another one of the subject, our filename, I name it as a filename and just name
it as the same.
And also that will be as a message, our filename.
So whatever the data I just pass from one message, I want to get it and I just take the things with
this variable that is the massive variable.
So now we have to do we have to pass it.
Right.
So if you want to pass it after that, OK, after that, I want to do undertake one of the variable,
let me just name it as a contact field or form a contact form data.
So this type of one of the variable logistic and into this contact form data.
So with this our list.
So here that is our model into the model area.
That is our class.
Right.
So now first of all, also we have to do we have to actually take it.
We have to take this model that is the model class name.
So here in our Veria, I have to do I have to import it.
That means I have to from our models and I have to import.
That is a model models.
I have to put out this class as a contact form.
So now I just simply import it.
OK, so that is a contact form.
So with this contact from here, I just simply pass it into the contact form that are here.
I want to pass all that, our getData what that actually I pass from what this important area.
Right.
So now I want to do an.
What's it say, just simply pass our name, that variable here, it shall be as a name.
So I just take that things with this variable, I just simply pass it.
So that will actually our this model.
That means this model.
This field.
Right.
So in particular, that field area, we have to also pass every data.
So I have already get all that, all the data, I get all the requested data and get that things with
this variable.
So for now, in order with this contact form, I just added our name and here I pass out this variable
that I want that actually I get from our input field.
I hope everything should be very much clear to you.
So now we have to do the same things that we saw of the data I pass from our e-mail.
What are the data I pass from our email is should be get all the data and I take the data with this
variable.
So here I have to do I have to actually pass it right.
That means here I just pass it in our this model and this email.
OK, so here I just simply pass it.
And also we have to do the same, we have to do the same things for our subject.
So subject and then also our methods data.
So just simply pass that message data.
I hope everything is very much clear to your friend.
And after that I want to do after that, that we saw that our field and after that I want to save all
the data.
OK, so I want to save all the data that means our this contact from data, so this contact from the
town to do and to save it.
So to simply save it.
Perfect.
So friend, that's all you have to do.
OK, so that's all you have to do.
I think every line should be very much clear.
OK, because of all I already discussed about that.
Things, everything.
So now let's check this out, not only if you like here I just click the save all.
And now I'm first of all, I want to check it.
Server is running well and now refresh it.
All this dynamic that is terrific, this play, and now I just put that name as a guardian and I put
that email Azarian at the way Gmail dot com would hide this.
I just put as a hi, this is just for test sorry test.
And then here we all do and actually pass on the data.
So I better go to our home.
I just saw some of the messages actually.
OK, that means there is a clear message.
I just posted a message and after that, if you click on this send message.
Yes, you can see they have nowhere else to display.
Now let's check this out, go to our database, Trebil, and now if you refresh it, yes, you can see
friendly successfully display our name that precedes the contact form here.
I added, if you go to that model here, I added that name, that name will be visible.
Right.
I just passed on of the name as our name Feelies Arion.
So if you open it, yes, you can see it's not perfectly getting our Arion.
That is our audience at Gmail dot com.
That is a subject and that is our total description.
Message, I hope is very much clear to is successful in the data.
So if you want to insert another one like a test and test at the original dot com artist and then send
a message as a test, OK, now clear the same message is perfectly.
I will also show you in everything that is going to successfully complete one of the form, then it
will be sure some of the message, OK, that means our last message.
And now if you go to a database, refresh it again.
Yeah, there is another one as a test and you can see every data is done successfully inserted in our
database area software.
And I hope it should be very much clear to you.
We successfully also make our dynamic, our contact space.
So in know next video underdo and discuss about that authentication path.
That means how can logging and how can register your app user and how can log out everything related
with the authentication.
In the next video, I will show you that things with a live example.
So thanks for watching.
I will see you in the next video.