Hello, friend will come back in a few years with you, I have already discussed about the things we
do.
How can read all the data from your database table and how can be the bullet in your funding area?
So now I want to do I want to make our dislike the dynamic.
Right.
So if you want to do that work, like they have some of the images they have on the name, that is the
title and they have that description.
So it'll be just like the same as our previous one.
So as I told you, friend, if you already will understand about this part, then it should be very
much easy to you.
OK, so right now I also want to display how we can do that work.
I will show that things with a live example.
So for doing this, first of all, here we have to do we have to create one of the table for our slider.
Right.
So now if you want to create the slider table, that is are you also right now I just simply remove
everything.
So for doing this, we have to do in our index area.
That is our model.
Right.
For the about.
I have created one of the tables.
So now for our slider.
I also want to do I want to create another table like here.
I just simply copied.
And after this I just simply paste it.
I want to do and to create another table glass.
And I just named the class as a slider, so I just simply named as a slider.
So it will be that way with our model.
It will be united, our model with the model class.
And then for this slider, I need one of the title.
That means this title.
I need the description that will be also the dynamic.
And also we need one of the images.
So it should be just like the same.
So for the slider I want to do is will be uploaded to our one of the folder at the slider.
So that means that the slider folder in our media, if you go to our media, into the media.
So here I want to do and to create one of the folder.
So I just simply create one of the folder as a slider.
That being slider related, every slider images will be Saib in our particular D folder area.
OK, so here it will be safe.
And then also I make all that feel as a mixer.
So friend here.
One thing I also want to show you, like for that I'm here I added as a blank as a false.
That means if you go to our side that means that you're clever about into the about us here.
If you go to our add about that, is all that or feel if you're not safe now consistent showing that
this field is declared, this field is good and also this field is declared it because of all here.
I have added as a blank, as a false.
So if you want don't want to make the things as required, then you have to do you have to change it.
You have to change the things with the truth.
So when you make the things that are true, that means it will be as a nullable.
OK, so here, if you make the things as a field, then it will be not display anything rather than
if you want to make things as a precursor, then you have to make as a blank false.
OK, so here you can see by default it's actually getting that all that validation.
So here you don't need to do anything.
So which is very much good.
Perfect I hope is very much clear to your friend.
So now for the slider, I just simply added the title.
I'm here for title and I just added a 100.
That description will be eight hundred and then our images will be saved in our upload folder.
The video slider.
Perfect.
So after that, creating this class, then we have to do we have to migrate it.
Right.
So now I just click as I save all.
So here right now there is our index.
So now after that we have to make it.
So that is our one of the terminal is already running better.
I want to open our of the terminal.
So that is our general we have to go to our portfolio folder as a CD and then portfolio.
OK, so that needs to be addicted to our portfolio folder because here we have to actually do that work,
right.
That is actually our project.
So now I want to do and the magnitude, Sufian, to make that.
And that means if you're around around that hour, make migration's then automatically.
Will be created one of the migration in particular that area.
Right.
So here I want to do that work.
So first of all, if you want to do that work, you have to write down as a python python and then our
manna's spy with this spammers by you have to write as a make migration's
make migration's right.
So now if you click on the enter now, Cassi is automatically created one of the migration's file for
the slider, that machine on migration Sadiya.
You can see it's automatically created one of the Magnuson's file.
And as I told you before, friend ID is automatically created.
So here you do need to add any IDs and then the title description and the name is perfect.
So now we are ready to migrate.
That means after that I want to to actually migrate this table.
So here, if you want to migrate, then you have to write down as a python and then manor's dot by and
that migrate.
So just simply added Python, Manny's Pi and the magnet now to enter.
Now you can see it's not successfully migrated that file, but right now, if you go to our database
and if you know, refresh it now, can you find our this table is not visible because of all here.
I didn't register it right.
So we have to also studied like that before.
And that means, you know, our index into the index.
So I think we don't need this OK, to the index and then our admin.
So previously I have created one of the glasses about and also I read the study.
So now I want to do the same things.
And now I have created another one that we in our models import and that models I have created as a
slider.
So now I just simply added that slider.
And also here we have to do we have to register it.
That means we have to send some of the request to our admin that I have created one of the three legislators.
So, no, I just simply added now clear the Savol and now if you refresh.
Yeah, you can see it's not perfectly loaded on here to the slider, so if you go to the slider and
if you go to the slider, you can see it's not perfect.
There is a title, there is a description, and that is our image.
Right.
So here I don't want to do unto inserts on the slider like that, the images.
And also we need the slider right now for any decent purpose.
I named as a slider, OK, slider inmate's name one.
And then I pulled some of the description.
But I just simply copy some of the description from here and it's far better understand I make the things
as faster.
OK, so that will be as a dynamic.
And also I choose some of the image so far for educational purposes and I want to do and actually use
all the images, OK, my course, all that actually images.
So I just simply add that image because I save.
And now you can see that is actually showing our slider object once here, also, if you want to change
it, as I told you before, you have to do, you have to go to your model area and into this model area.
That is our magic method.
So this magic method self here, you can displayed like if you want to display it with the title, then
it should be displayed the title.
Right.
So I just simply make the things as a title also on here because I save all and now refresh it.
Obviously it's not perfectly updated.
So now I also want to add another one as a slider.
That means that you amaze me what exactly I did on here.
Like there is a slider image, right?
So I just simply add new one.
It will be at the slider image to slide that image to.
And then I just copy some of the description and also choose some of the images.
Right now I choose this one or it because I save.
So there is a slider too.
And if you also want to add new one, you can add multiple.
From here there is a slider three,
slider three.
And here that is our description.
I just choose some of the images and now I choose this one.
OK, so fertigation, I'm actually using this type of one of the images.
So if you want to use this step of one of the images, then you can actually download some of the images
from the Google look.
So, for example, I'm using it now click as I save.
So here I have already added our three of the slider as a slider, one, two and the three.
Right.
So now we have to do we have to get our data right.
So now I want to do want to get this data.
So that will be also displayed in our index.
That means we have to work in our slider and into the view that we see in our index view.
Right.
So here I want to do and display that things in our home page for the reasons here we have to do that
work.
So now I just simply copy it.
And also here I just simply paste it.
So here also, just like that same I just named one of the variables as a slider slider data.
And then also I want to go on to get our model's data.
So if you want to add a multiple from the same model like here, there is another model name I just
declared as a our last name as a slider.
Right.
So you can also add that as a slider, you can also add that things as a slider either.
Then you can also add the same line then.
So be easy to you.
OK, that will be easy for you.
So now I just simply copied that will be our slider.
So I just simply load our from our model, from the model.
I import our slider class so that they are slider.
So now we can actually use it.
So here I just simply use that with the slider.
I get all that our object.
And then in our context, that means in our dictionary area here, I also want to learn to actually
pass it.
So the comma, I just simply pass another one.
I just name it as a slider.
OK, so it doesn't mean that you can you have to do that as a slider.
Whatever the things will do, you can actually get that data with this key.
OK, so now I just name it as a slider and also I get all that our object and here I take the things
with this variable.
So here I just simply pass it.
So now I want to do and if we pass over this data.
So here I have already passed the data with this context, you know, indexer this Tamalpais.
So if you want to check it, like in our that is, you know, our index space.
Now go to our index.
So that is our index and into the index area.
So I have already display our detailed description.
So here, first of all, I want to actually check it better here after that about us.
That means there is a clue about us.
So here I want actually check it.
So if you want to display what exactly you have to do.
So from our view, I pass our context and that is Clocky as a slider.
So we decided I want to do with this slider.
I want to access our if you go to that model or feel them as a title.
So on totally Jackett, our perfect is getting that data or not.
So I just simply added our title.
OK, now if you click on the Save All and now if you refresh it.
Yes, you can see he's not perfectly getting our name, that means the slider in his name one.
So here you can see that the slider remains number one, sees no perfectly displayed that our title.
That means we successfully get it.
That means we successfully get our title.
Right.
So now I just simply check it out.
It's perfect.
But here one thing's friend like here you can see I just get only one data.
That means a zero in this data.
For the reasons you actually display our fast on data, that means fast in this data is visible.
But here I don't want to display some of the specific raw data.
Right.
So when you actually display a specific one of the raw data, then you can actually added that indexing
data.
OK, that means a zero index, the one index, the two index that is actually display one of the particular
raw data.
But here I want to do and actually get our all data like here I want to display our three of three of
these slider.
Right.
Not the specific one raw data.
So here, if you want to do that work, then it can be displayed with some of the for loop.
So by I will show you like right now I want to do and actually get to the specific role that I want
to get, all the data that we want to display three of this slider.
Right.
So now also here we have to do that is in our index.
So into the index area, you can see into the index area.
I include our slider.
Right.
So here we have to do we I just passed that data in our index estimate with this context.
Right.
So here we cannot actually pass that same data into our slider data as HTML.
But here, if you want to pass it, you can pass it with that.
OK, so with that we can actually pass it because of all the index data e-mail.
I get all the data with this contest and that is our index system.
But if you go to our slider part, that means this slider part actually I included in our home page,
remember?
So here I just simply included.
Right.
So now if you want to pass it, then you have to do you have to add that with.
That means that with and with our data.
So I get all the raw data and take the things with this variable.
So now with this variable, I have to try to parse that data.
So I just simply parse it, OK?
That means this variable data and it is variable.
What exactly the things I did on here, I get all the tools like the data and take the things with this
variable.
Right.
So now I just simply pass it.
And then here, here we have to do we have to pass our key.
That means what, the data actually passing out this dictionary.
So I just put that dictionary out with the slider.
OK, that means that is actually our slider.
Right.
So now we can actually displayed.
So now we can actually display with the slider.
So if you now go to our slider parts for the slider, I have already included it.
That mean the slider total CMO, you can see the slider.
So here I have already loaded our Lord is static.
So that is our slider one.
So I want to do and to make that dynamic so that all the static data.
So right now I just simply remove our tool slider and that is our three slider.
Right.
So I only want to do and the want to update our dispersion.
That means the slider one portion.
So here that will be our title.
So I don't need this, I just simply remove it.
And here I want to display that our title.
So if you want to display this title, first of all, here we have to do we have to load one of the
for loop.
Right.
So as I told you, when you actually get a specific one of the raw data, then you can actually display
directly other than when you get all the data, then you have to do we have to run one of the follow
up.
So I just simply ran on the for loop, as I told you before.
How can I write that from for loop?
So that is all for loop.
And then also we have to do we have to finish it.
So I just simply finish it.
Sorry, I just simply finish our and for say to simply at the as and for right.
So now I want to do I want to go into the for loop area.
What that I actually pass from the index with our, with our slider data.
So now we decided that we get all that, our slider images and also information.
So now here we have to do I want to show with raw or whatever you want in our main data, that means
here I just simply get it.
And here, if you want to make the things as a rule, if you want to make the things as they are, then
whatever you want.
So right now, I make that as a rule.
Right.
So now with this row, I want I can actually split.
So show you.
So here with this row, with this row, I want to do I want to show our filename.
If you go to the model, I want to show our title.
So here title.
So I just simply copy that will we are finished.
I just simply displayed and also I want to display our description.
So right now that.
Is so many ticks.
OK, so better I just simply remove it, so that will be our description in our model or filename as
a description, that will be our of description.
And also there is another one for the inmate.
That means here we have to do have to display that image.
So I want someone to do want to make that image that the dynamics of the regions here we have to do
here, but just simply remove everything from here.
So that will be our you and that you are Eladio with this hour.
So with this rule I want to do and to show our database filename as a tool used to be just like the
same before the emails and the emails and then already.
All right, let me see.
Shall we display our image?
So that's all you have to do.
Now, let's check this out.
If you look at this table and now if you refresh it, yes, you can see it's not perfectly getting all
three of these data, but our slider is not activated because of all they have sold.
You can see they have some of the active plus.
So here we have to do we have to update it like I just put on the condition.
So here I just put on the condition that we solve the if condition.
OK, I just put on the if condition, if our lives for loop, OK for this for loop as a fast.
So I just simply added that if our this for loop as a fast one that means fast and then I want to do
to make things as active.
And also after that we have to do we have to finish that out.
And if that means and if perfect.
OK, so because of all here, that is our total dynamic part that that means the dynamic slider.
I just to save all and now refresh it.
Yes.
You can see.
So that is our slider one, slider two and the slider t so friend I hope is very much clear to you now
we can fully vetted our images, successfully updated our title and that is our total description.
Right.
That means our description and title.
Everything is not totally dynamic.
So right now here I have created the three three.
So now you can see there is actually three majors is visible I hope is very much clear to friend.
As I told you, that is actually the main basic concepts.
If you will understand that basic concept, you can create any side dynamic very easily.
OK, so in Django, it's already made everything is ready.
So you have to just know how we can use it.
So that is the same procedure you have to follow for our.
So I have already discussed about that.
How can I play that slider that about Pushtuns.
So now your task is to updated that service, OK, to make that Sarbaz as a dynamic.
So here you have to do we have to create that title and there is a short description they have the tuffield
will be needed.
Right.
And then you can actually displayed on here that for the services that the portfolio will be just like
that.
Same.
And there is also the decline.
Pushtuns a bit.
I also want to do in our next video, I want to make our disclaimer position dynamic.
So for the client, I want to do and to create one of the table in our index.
Right.
And then we have to do we have to actually add it so we can do that work.
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.