Hello, friend will come back in a previous video, I have discussion about that you are patterns.
So now in this video, I want to discuss about one of the most important part in Django, that is include
Methode.
So how can working with this include Methode in this video?
I will show you that things with a live example.
So now for better understand.
So that is one of the bootstrap of the template.
OK, so that is one of the bootstrap templates.
So here for our this fundamental project, I want to use this theme so into this theme area, you can
actually download it.
So I will discuss about that later.
Right now I just simply preview this team, simply the theme area here.
You can see they have all that in our home page and into the home homepage area.
They have one of the slides, right.
So that is the slider.
So slide the maximum time actually display only into the home page.
But if you go to about space in there, about the space here, you can see our header is the same and
also Futer is the same, but there have no slider.
But if you go to that home base and the home page, you can see there is a clever header is the same
and the future is the same.
And but there have only one of the include one of the things that the lower slide.
Right.
So now we can actually add this type up.
Another one of the part you would using that include.
But I assure you everything will be more clear to you like that is our base and the base area.
I have already put that link as a home that they are about a space that is a contact space and there
is a profile page.
So now if you open our layouts, that is in our layout.
I have already added that our this Napat in our layout area.
So don't go to our project and the project area.
If you go to our template, it is a template that is all layout.
Right.
See the layout.
So here that is our neighbor.
So that is our neighbor and then that is our block.
That means the block content side of the block content area here.
If you added all of the H1 tag and I just name it as a this is a slider part, OK?
I just name it as a this is a slider part.
And now if you click as a Savol and now if you refresh it now you can see they have that other part
is added as a this is a slider part.
But here I don't I only want to visible our slider part for our home page, not the about page.
But if you go to that, our about page you can see into the about face also is added.
That is a contact page that is also displayed on here and also is displayed in our profile page.
I hope you can understand about it.
So here I only want to display our this slider part for our home base.
So if you want to do this type of work, then you can do this work with using that include method I
show you.
Then everything will be more clear to you for doing this in our project into the project templates so
that the template area, I create new file and I just name it as a slider.
OK, this slider dot SGML.
So now here I want to do I want to add our this text.
OK, so I just simply got it from here.
That is from a layout toters Temel and I or Slider and the slider area.
I just simply passed it.
So now if you click as a Savol so now it's not should be visible like a refresh.
Now this is totally clean and if you go to about a space that is also a liquid.
So now I want to do I want to load our this takes that means our this slider dot estimate.
This takes in our space.
I want to display in our homepage right.
For the home.
I have already added that link.
So that means if you go to our main portfolio into the main portfolio area, that is you.
What else.
And that is our home.
Right there is a home where there is a view.
I just loaded our on the function as a home function and there is our department.
So if you go to our views and the home so that it means there is a views and there is our home here,
I loaded our index statistical right index.
This is our main home base.
So now if we go to our template and the template, that is our indexed estimate.
So you do that in this e-mail here.
I want to do I want to include our slider, OK, this slider dot e-mail.
I want to simply put it on here, then automatically it should be visible in our particular that area.
That means in our home base, I show you like here, if you want to include it, you have to include
it in particular this blog area.
OK, make sure you included this block content area C block content area here.
I want to do I want to include it.
So if you want to include first of all, there is a color bracket and then the double person is and
then you have to added that include.
OK, that means to include and include our whose file include our dislike that that we decided not to
file.
I want to include OK, so I just simply named that are fine.
So that is into the same pot.
So for the reasons here, I just simply added as a slider, slider, dot astm.
All right.
So that is actually small so that the slider daughter's table that is decided against either simply
in good on here.
So now let's check this out.
If you click on the save all so that is our index, not the CML.
And now if you refresh it, yes, you can see Fehn.
Now, our slider dot e-mail is perfectly loaded on here.
But if you now go to our aboutus, you can see if the about Espace here, they have no slider because
of all here.
I didn't include any slider.
So there is a contact space there.
The profile pages, everything is clean but only in our home page area.
I include our this part that in this slide.
Right.
So if you want to like better I want to update it.
Cerveteri just simply copy it.
OK, just simply copy it.
And now that is one of the class actually.
So better here.
Here I want to actually report on the day of class and I just put that name as a Jumbotron and H1 tag
area and they together to do and actually cart it and here I just simply name it.
OK, I just simply name it then actually we'll look at it.
So here I just simply add this part.
And now if you click as I save all, so now it should be one of the blog actually.
So here if you can get the refresh.
Yes.
You can see.
So this is our slider part and that is our home page detail.
So if you go to our about he did about the space that have no slider.
Right.
So Subframe, I hope is very much clear to you.
How can include any file.
So here with this, you have to make sure you have to add that things in that we include all the file
into the block content area.
So the the block content area, I simply include one of the slider noticed html with our this include
method.
OK, different.
So that's how you can actually do that work.
So if you want to display it, if you want to displayed in our profile piece, like if you go to our
employees there is a profile.
Right.
So now there is a profile of this Jammal.
So if you now go our profile so they have no file.
So if you want to displayed on here, you can display I just simply include our slider dot e-mail for
our profile basically of the save all.
Refresh it here, you can see it's a perfectly display if you go to the contact, it's not displaying
on here, there is a profile.
So, Fred, I think its concept is very simple, but is very much important on the part which will be
needed for this project.
OK.
No, I just simply deflect it from here.
Refreshing.
It is totally gone.
Go to home.
Only our home base area outside our base is visible, you know, next video and discussion about how
can rendering the context in your template.
So thanks for watching.
I will see you in the next video.