Hello, friend, we'll come back, you know, previous video we have created, one of the model that
is our middle class name I have defined as a building address, and also I have created one of the form.
Right.
So now I want to do I want to visible this form.
So if you want visible it, we have to do have to work in our apartment.
And that is our view.
Right.
So which is essential.
I think you already know about it.
What exactly do you have to take for The View?
All that fine.
So that is clue by default.
It is a shortcut that is are important to render.
Right.
Seem to these shortcuts area.
Also, I can use another tool of this class, so that will be as a response.
So I just simply simplify this to be response and redirect.
So there will be also needed and also in particular that area, that is another one as a redirect.
So I just simply add it on here.
OK, that means that redirect and also we need that reverse.
So that is in our form and the Django and film Django that you or else I need without you or here.
I understand the import, the reverse.
Right.
So that is reverse.
And also I need our model.
That means our model I have created in our apartment.
And also we need our forms are better able to do and take note of this.
So here I simply defined as the form and then our app payment.
So from to the app I want to do on to from more appartement the models from the model area untampered
all model.
Lemp.
So I have created one of the model in our app that means here that they are building address.
So just simply imported and also we need our form.
So now I just simply have the form and in our app into the app payment reserve forms right from the
forms and import.
I have already created the you know, formally I have created all the form name as a building form.
So no, I just simply input also on here.
And also we need our order.
That means that is actually the all the order we have also displayed in our payment.
That means checkout pays for all the order in our new app order.
Right.
In our app order that is our models.
So if you go here, we need our card, right.
We need our card.
And also we need our this class.
That means our class better to take note of this, that we are from and from our app underscore court
order.
So from our app order.
And there is our models, our models from here and to import and import input our order.
Sorry, I import our order and the card.
OK, so of this class I have take that things on here.
There is our order and that is our card because that's what we also need it.
Right.
So now I just sort of take both of our class on particular that position and also we need our locking
be good.
So locking the card in our decorator's area.
Right.
So I just simplify the form the Django and then the one trip
cantrip and then the opt out and the decorator's OK decorator's from here and we import our locking
the good locking underscoring good.
Right.
So that is all locking the good so that all different, everything is very much common.
And here we used a lot of the time with the same things.
Right.
So I think you should already know about it.
So if you see if you back to C then you can remember a big class, what exactly you have to call it.
OK, so that is all locking the curtain now with this locking because I wanted one to create one of
the functions.
So here it will be as a longing declared and now one to define another function name as a Dave and I
just name it at the check out.
OK, so it should be at the check out.
And also here we have to pass that request.
So here we have to pass the request and then it should be the same for method that we have done before.
So just take on the variable name as a safe, OK, by the name of the save address, I just gave me
the the save address and now with our this billing address.
Right.
That means here in our model area I have already defined all the door feel.
So here I want to take all that field so that they are being addressed.
So it is billing address.
I define our objects, that is our objects.
And if here there is a function as a gate are and the create, that means if there have already some
of the data in our particular date, all that field, it will be get all the data rather then it will
be create this data.
OK, so far the results here are defined as a get our create function and then our user will be our
requested user.
So request it user.
OK, and then I want to do want to change that format like here.
That is all the data.
So that is all that our feel that I want to do and to convey.
Headed out to the object, so here, if you want to convert it, that means this data.
OK, so here I defined as saved saved address.
So to simplify the save address and better to also make the things has saved.
OK, let me the saved address, then it'll be better to you.
So this save address I want to do want to actually make that, convert it to the object.
So for the reasons here I want to do want to with this, save data like this, save data, I want to
convert it to the object as a zero object.
And after that I want to do want to add or form.
So our form will be with our this Birling forms.
That is our building form I have created.
Right.
So with this building form, I want to do and define our existence, all the data that means our already
this field if we have any data.
So that is all that our data we have the added at the instant.
OK, so in this instance I want to do I want to define our these save data and here reconverted with
this object and I take the things with these variables.
Now here I just simply pass it right.
And after that we have to do the same things that we have done before.
Like here we have to define the if condition, if this request map toward that means if this is methodically
equal as opposed because we have to also load this form.
Right.
So now with this was the failure to check it and then our form.
So with this form, then our this building from so this building from here, we have to parse that already
existed post so that the requested and then our preexisted post.
And then also here we have to parse out this instance, all the data.
So here I just simply pass our extensive data and after that we have to define our condition.
Right.
That means if sorry, if our form so if our form is valid or not.
So here I have to define the EAS underscored valid.
So even valid then it's still bidu it shall be saved.
This data that we save our form data that is simply defined as a safe from data and all this waveform
data will be again replaced within our DC Nestande area that in a sense that area.
Right.
So here if you want to defining it.
So I think you already know about it.
What exactly thinks you have to do?
That means in our form area, what are the data?
Now you updated this data will be safe in our privacy Nestande area.
So we are building sorry, in our building that is in our building familiar with this building form
here.
We have to pass that our extensive data that means this instant save data, OK, that me into the form
of whatever the data will be uploaded or what data will be updated.
This data will be added in our instant, our previous section.
That means previously that field area, it will be replace it with our new data.
And after that, also here we have to do we have to load our pace.
That means here we have to load it with the return and then ORENDER.
So with this written render, that is a request.
And then also here we have to do we have to create one the page.
So that means in our app underscore payment, OK, to the app payment if you go to it and if you go
to our template with the template into that app payment here and want to create the file and I just
name it as a checkout checkout dot SGML.
OK, so now here I want to do and we define that name that see in our app payment area.
I want to do, I want to create, although I have already created all the pace of the checkout checkout
dot e-mail.
And after that also we have to do have to pass our contest from data that means into the context so
that the context area we have to do, we have to pass our form.
Right.
So here I just simply define our form so our form will be our form.
So just simply pass it.
So now we can actually access our this form in our that checkout based upon checkout daughters.
Tamalpais.
So now we have to we have to work in our d checkout birthrights and go to our checkout.
And here, first of all, it will be extensor basis also extends our business.
Tamalpais dot xhtml right.
It will be extends our daughters Jemal and also here we need our Quispe forms.
So here also we have to do we have to load our Crispi Quispe underscore form.
OK, whispy form text.
So undress Coatex.
So here you have to load it and then our block.
That means our body blocks or block will be our body underscored block.
Right and.
Then also, we have to we have to end this block, so just simply and this block and block so far access
this Check-Out pace, we have to also defend you.
All right.
So now go to our payment.
If that payment and that is all you need to know in particular, that position.
I want to do want to define that.
You all saw here, here at the that and in the party area.
I want to do and the real name will be at the checkout, OK, which will be at the checkout.
And also in our views, some of the views I have already created.
One of the function in The View, I have read the function at the checkout.
So now here I want to do and define that checkout.
So here that will be our function name at the checkout.
And also here, define some of the name.
So name for this and it will be at the checkout.
OK, so here I just simply defending it and also the app name I have defined as a payment and the regular
check out.
Perfect.
So no I want to do and to put that link, I want to put that link, you know what this card piece into
the card piece and here that is our process to payment.
But I want to define the process to check out.
OK, so here I want to define that link.
So that is in our cart.
And if you go to our e-mail and that is our app order and the card e-mail and the card e-mail here,
you can see that is up to the process to payment.
So get around to make that in the process to check out.
OK, for us to check out.
Just name it as a process to check out.
And here we have to define that you are all that we are you are right now created.
So here you're still with that you are OK and that you are still here.
And I have to defend our app, name our app and will be app underscore payment.
And under the app payment here that is our payment and the A check out.
So no I want to do and define that our check out.
OK.
And so here I put that link.
So now it will be redirected to our aspecific this base that we see in our checkout page right now if
you check it like here.
I right now in Toronto, salver the pie and then man is not pie and then run server.
Enter.
Our server is not running, and now if you refresh it right now that there are to because their process
to check out.
Yes, you can see it's not perfectly adequate to our checkout base and also here at our business table.
So do the best we have get our this header.
So that is our heritage visible.
So that means our district page is not perfectly working.
So here I want to do and load our form.
That means that is actually a form I have created in our form so that the form with all that field.
So no, actually there is you are allowed on.
It is there is a card, the same mail.
We don't need these to check out the stimulus we needed.
Right now we don't need to remove it.
So here, first of all, I take the Dave OK to the Bay Area at the front of the class of the container
container and empty five.
So I just simplified the container, empty five and then I take another I still tag so into the extra
tag area.
I define that another class.
OK, so the symbol of the U.S. depends on you, whatever you want.
Right now I'm actually using ACMD three, the results of the building class or right now in our history
area.
I want to define a will be sure the shipping address is shipping address, so that will be the shipping
address and the shipping address is will be sure our base link.
That means that we will be in our checkout base.
So here I define what do they spend?
And under this pen area I define that name will be at the checkout.
It will be at the checkout.
OK, and also for this is when I define one of the class.
So all class will be as a text mute.
OK, text me this type of class.
I want to use it if you're not here to save all freshet.
Yeah, you can see it's not perfect.
It's not showing us our shipping address and the take out better.
And to make that as it is for OK I just make us age four and also and that age four.
Savol refresh it.
Yeah it's much better.
So here I want to do and to distinguish with the turo one will be our this one.
And here I want to take another one for display all the tall order and it will be here.
I want to load our form.
OK, so for doing this after this.
It's OK after this one I want to take another day and that will be as a rule that means the devil here.
I want to distinguish with the two diff.
So here will be the call.
Gorell Amde nine.
OK, so just name it as a call and be nine on the left.
And also I want to take another Leot.
I take another load.
It will be, as I call them, the three.
That means that is equal to twelve.
So now first of all, I want to work on here.
So that is our one Dave and another Dave.
So now first of all, here I want to do all the different, another Dave.
And here I take that as a card.
So there is also another class.
I definitely am be Ghormley five am defined.
And also after this I take our cardboards.
So I just separate from the Dave as a card and then Bardy.
OK, so card body sillu the Cavalieri I want to do under load or form so I just a different form here.
We don't need any class, we don't need any methode and here I only need our methode as opposed to simply
defined as the post method.
And here also we have to do we have to load our form because in our view from here I have found that
form right.
So no, I don't want to use it.
So that will be our form.
And also here I loaded our Crispi so now and I don't use that Crispi form.
OK, that will be our case before.
Perfect.
And also here we have to do we have to define our CSR field.
So I just simply live another C SRF and rescue token so that those yourself token and then a button
will be needed.
So I just simply from the button will be at the submit and then here also we don't need any name here.
Just remove that name.
I found that the class button class will be as written between primary primary and then and between
s.m.
OK, I just name it as a button s.m and it will be at the same address.
So it'll be, as I say, WordPress.
Perfect.
So that's all you have to do.
OK, so that's all you have to do.
Now let's check this out.
If we're not to save all and now first of all, have to check it.
Everything is running well, now refresh it.
Yeah, you can see it's not perfectly getting all the to address that zip code, the city and the country.
So now also here at defining it.
So if you go to our view here have also defined our form, that will be saved with our insistence that
area.
Now, let's check this out here.
I define that address as USA and board some of the code and that defines the US again as a New York.
OK, so new and the country are different of the USA.
So this type of the information right now, I'm using a bit different from the address for education
purposes.
Not clear the same address.
Yes.
You can see it's not perfectly safe.
That means addresses safety code is also safe and there is no city say the country is safe and after
that is showing all the instances that are for the reasons here.
You can see after that they are defined as a form in the building.
Our building for media is to be in a stands our all the same data so that now you can see it's not showing
our instant all the same data.
So now if you go again, our homepage, go to the card, go to the process to check out.
You can see it's not showing or all that instant save data.
Right.
So that's the reason we actually using it.
And also here we successfully define our checkout and also know here, if you want to define our message,
then it should be actually interactive, better able to use that message option.
So if you want to use that message, first of all, here we have to do you have to add our message glass,
right.
So that is our form.
And from what, Django, there is also one of the building blocks right.
There is our country.
So from the country, I don't want to import our messages.
So here I just simply import our message.
So now with this message, I want to display our this message that means we need to be safe.
This data look, where shall we save this data?
So after this here, I find that messages with these messages.
This will be the success, OK?
Should be as a success tax and then the request and here on the display that what that thinks it will
be display like here on the display.
The shipping shipping address, shipping address, save sieved.
So this step up of the messages will be displayed.
So now let's check this out.
If you click at the save, also here it is simply the save all.
And now I just refreshed.
Now, I want to change it on here that you called the things that they called because they are save
update.
Yeah, because it's not perfectly display our shipping at the safe.
And also, if you want to change the tone here, we have the same address.
Yes.
No, perfectly visible.
OK, that means right now, if you want change anything automatically, our message optional, invisible,
and also to have another one, that means in our current area right now that have some of the product.
Right.
And also that is our product quantity.
So now I want to do all the visible over this product name with also the quantity in our D checkout
base.
That means here so far the results here, I have already defined another column.
So in our checkout here, I have already defined another column as I call every three.
Right.
So here I want to visible that file so we can do that work.
In our next video, I will show you that things with a live example.
So thanks for watching.
I'll see you in the next video.