We were working on phones, so we had made a form using of using a phone camera in general Zhangjiakou,
so I ended up filing forms or pivo and then I had made a phone.
So this is the look of our home than it used to be.
The file I define to my third one was a should matter is equal to post and one was the case.
So basically I give a quick overview of what we were going to do.
So like when I finish this page, so basically on this, you are making a get request and on at the
request.
So basically this block of code gets executed and this block of wood gets executed.
And this tells that I had imported the foam on the top of the file folder, full import store.
You can import any form.
So when you use to assemble, so I use forms to fill the form to dispose of the foam, which I was referring
to.
And then I was able to render this form on my on the front end part of my application.
OK, so basically what we are going to do, first thing we're going to do is add bootstrap class to
this form, to what you're going to do with your input is to find inside your file.
So you need to define a dictionary which has given loopier.
So basically this dictionary is defined by attributes.
So 80 hours is a.
This is a symbol for dictionary.
So it has a key piece.
OK, basically at the left, it will either keep it a key and ungraded parameter value.
So these attributes could be anything which could be named in class, which refers to the basic syntax
to follow.
So what I do, I define a class and I'll give it a value of form, control or code.
So most of us would be thinking, why only form control after class?
But this is a different class present in the bootstrap.
So this would make a far more responsive.
And for the another text area, I do the same.
OK, I'll basically copy this.
Yes, and if not, that's fine.
So when I looking my page, I would see bootstrappers to my form.
Yeah, you can see the butcher has added to a form, but this is this isn't responsive.
So what we are going to do.
I'll go to by my phone to an IRA Glass is will call me dipsticks.
And I put this foam inside, I did OK, and I know what I'm going to do, OK, to get the foam on the
middle of the page I live on the style side is a little margin, zero or two.
OK, no, this is fine.
Yeah, now this is in the center of the page, not as good to check this box unless I press control
shift.
I know this looks good.
There is some issue.
OK, it's fine.
OK, now this is warm and responsive.
OK, listen to the president, but no further back and forth.
What if I want to submit this form to someone just for the matter, to the post matter?
OK, and I generate a token for this.
This is person see it on the scope token.
So a token is necessary when I need something to form my perspective.
OK, and this is a form which I had rendered.
And additionally, I need a button also button type to submit class beauty.
So this is a shortfall button primary.
This is a default bootstrap class and I give the segment.
Now this is fine.
And I went.
OK, so here comes the bucket.
I'll give a little bit as talented as Burton style is a little margin, zero or two bits of.
OK, it is it is it it is not in the sentence I display.
Block.
OK.
And what I can do do look at margin zero or two and zero for the bottom.
So what I'm going to do so this is a third full time rotation, which is on the top.
I'll give one round and on the left and the right or two.
And on the bottom line is zero.
So this will give.
Yeah.
So it gives a margin to one room and on the left and right or two and the bottom with the left and right
bottom top is one at the bottom zero to this final.
So I'll make no move to the back and cut.
And what I told you when I refresh this page.
OK, so I was making a get on this road.
So when I get to on this route you can sit on the Zurin.
So the form had rendered.
But what if I make a post request when I would be making the post request?
Basically I would with somebody in the phone book.
So when I'm going to submit the form, so what I'm going to do, I'll make phone use of the dot com
request dot post.
OK, sorry, requestor post.
So I get all the values when the bomb has been submitted using post matter.
OK, ok.
But still I'll make a condition to check for what is underscored by.
It's a little violent to make sure the form is valid and I'll make title is equal to request post and
title tight time done, OK and subject so or I'll make again the same request for the subject.
Subject is to request post and subject
underspecified and I would print the title here and print subject here.
OK, and I'll return an a response.
OK, but I'll make up that is going to SDR.
Form submitted,
plus start the quest dot.
Methods.
OK, so this is find it here.
Yeah, no alternate legislative response so that, OK, if this form is not valid, what to do?
So what I'm going to do, I'm going to render the form again.
But OK, and I define my dictionary is equal to distinction is going to be the same as this one.
And you can see
form on.
Fall, OK, and this and it could be copied, this ends OK, now this looks like this.
I'll give you a quick overview.
Is the request or method both get this block of code gets executed in which it says I'll render the
form on the front part, OK?
When I submit this form so this block will be executed, which is request the method is equal, is equal
to post.
So form of feedback form.
I'll get all the editing requests or post.
If the form is valid, then I'll get the two values that the subject and title that brings the title
for the subject.
And I have given a name variable which has form sorted by request or the response of where else in the
form was not valid.
So you need to check that if the form was not valid.
So I would render the font on the front part again.
OK, it's almost not valid.
So what I'm going to do it is I messed up.
They both ok, but OK.
Before this I start my salver.
OK.
Yeah, that's fine.
OK, I'll refresh this page.
OK.
Now, when I read the speech, I made a request, so I render the form the front in part so that I'll
give a title and sit at the table.
I'll make no submit this form.
OK, so I submitted to public notice form submitted posts, so this was a matter which I had to find.
So when I submitted the form to this block of bureaucrats executed and here you can see that I had executed
opening statement here.
One was a title and one was a subject.
So title corresponds test.
And this Hagans test was title and I was stay in my subject.
But so, so thank you guys.
Thank you so much.
I'll catch up in the next Tokura.
So you need to be very careful by writing this code.
You need to be very careful about writing, which if condition is come inside, which if then else that
elif part.
So you need to have a quick overview on this.
So in the next period we are going to know how what happens if the user into form is not provided something
is wrong then how we can errors related to that file on the front end part.
OK, so thank you guys.
Thank you so much.
I'll catch up in the next lecture.