Hello, friend, welcome back.
In this video, you learned view, and there you are.
So what is your view and what is your world like here?
If you go to that Google official site and here you can see there is a Google dot com.
So this Google dot com actually, that is actually that you are.
And when you pass that, you are literally addicted to Google server.
And this server returned with some of the View pages, which is actually user view.
OK, so that is actually The View page that is on Google official of that view.
So in Django, that will be just like that.
Same here.
When you pass any requests, it will be directed to one of the requests to the file as you are Dot Lotfy.
And here, when this request will be matched with our Etoile, they need to be response on The View
page and this response will be easily visible.
OK, so here we have to find out that you are to start phy and the views dot file.
So everything is already on our project.
Like if you don't open our project and order the project if you go to our fast app.
So I have already created all of the application into the font step here.
You can see that left to the view dot fight.
So for every application there have the individual from The View file.
And if you want to manage all that your view file, then you can manage it in your main project.
That is our first project and the project here, you can see that directly, that you are a file of
a friend.
So that is by default.
So here you can manage your older view file that you file, your user will be visible and here you can
manage your all the file from your project and that is where you are.
OK, so here you have to write down your all that you URLs and we see what else you can manage all that
view.
So step by step, I will show you.
Then it'll be very much clear to you.
So first of all, I want to do I want to work on The View.
So if you go to that view and here you can see by default there is a from Django shortcut in both.
And so here I want to do first of all, here I have to import I have to import our EDP request.
Whatever the request you will pass for you.
You all right.
So first of all, here we have to import it like here.
If you want to import it, then you have to define it the form and then the Django.
OK, then the Django and the EDP requests.
I just simply defended the EDP and now I import it.
So I just simply import our EDP response, all the tickets I just simply defined as the SCDP response.
So I just simply define our EDP response, so as I told your friend, whatever the request you will
pass from, aren't you?
What else?
So first of all, here we have to get that response.
That means our EDP, all the response.
So now I just simply import it.
And after that here, I want to do want to create the view.
So if you want to create that view, first of all, here, you have to define that one of the function
like here I want to do and to create one of the functions.
If you want to create any function in Python, then first of all, you have to define that things with
the draft.
And now I name one of the function of the index.
OK, so right now I just simply defined that name as the index.
So this will be our index view function.
And here into this index function area, I have to get our this response equal rights for the regions
here.
I want to do want to take one of the parameter and I just name it as a request.
So whatever the name you want to put here, that is actually look like one of the variables.
So here I just simply define out the parameter as a request.
And now here I want to do want to return one of the responses I just simply defined as a return an hour.
I just take all the things with this EDP response.
So with this EDP response, I want to respond some of the base.
That is a view that also right now I want to do I want to display as a hello world.
OK, so this step up, one of the things I want to response.
So now we have to do we have to visibility.
Right.
So here we have the visibility.
So for the reasons here, we have to define this response in our.
So now go to our project.
That means my first project and that is our water and the world.
So there is some of the comments here and comment, we don't need this.
I just simply remove it.
OK, and here first of all, we have to do we have to load our D view.
That means here I have already defined one of the function as an index function in our five step application
right into the first step application.
That is our view software.
First of all, we have to do we have to load it.
So in our view, what else that means in our first project, you or else here we have to import it.
So I just simply define as a form.
So from where you want to get I want to get that things from our fast steps.
So I just simply defined as a fast, OK, fast and then underscore app.
So that is our application name and form to this application.
I want to import, I want to import which base.
I want to import our view this space.
Right.
So here I want to simply define the views that are simply defined as the views of different.
So I hope you can will understand about it.
So that is our application as a fast app application.
I just simply definitive from our Fastweb application, I want to import our view.
So that is our views.
OK, so now I want to do and define on the path for this one.
So here in particular, that position.
So that is actually the by default one of the parts and I want to do and to create another new path.
So here I simply defending the path.
So I just simply defined that part.
So in particular that position.
First of all, I have to do I have to define our equal.
So which is what you want to visible for our space.
That means here I have already defined some of the response data, so I want to display this data.
So here I want to display this data, one of these specifically what else?
I want to create one of these are the index.
OK, I just simply name it as an index, one of the other.
And also here after that, we have to do we have to define our function.
So I have already created one of the function, in our view, right into the views I have already created
of the function R function name of the index.
So now I just simply defining it.
So I just simply defined the views.
OK, within this views, I just want to access our index functions.
I just simply defined that index function.
So if you want to put that name for this, you are and you can define that name.
So you just simply defined that name and I just name it as index.
So I just simply name it as the index.
So now let's check this out.
I want to do the save all and now I want to run our project.
So here that is our politics.
We have to go out.
This is my first project.
So now if you want to go it, I think you already know about it.
There is a CD that the actually and then m OK and tab on the enter.
So right now we are appropriate our location and here I want to do Enteron or Shahbazi if you want to
run it.
I think you already know about it.
You have to define as a python.
Right.
Python and the Manor's man is dot fi and the run server.
OK, and a simple definitive answer was noncyclical on the enter.
Now you can see our survival is totally running, so I just simply copy it.
I just got copied and now here I have defined already what this will be as the index, right?
So that will be our main part.
So if you have that website, that will be your wife's name as the X, Y, Z, dot com.
And after that, your domain.
After that, your domain.
That will be our.
You are right.
So that will be a we are also now able to do here.
I just simply posted and after that it should be as an index if they just simply define an index to
enter.
Yes.
Now considering now it's actually showing our peace message that the response message as a hello world
friend, I think now should be very much clear to you, sir, here, that will be our quarrel.
And if you are ill, I just simply define our views into the views that is our function as an index
function and into this index function.
If you go to our view, that means here I have already created the function as an index function.
Here I get that request and with this returned our EDP response here, I just simply response our Hello
world on the 26th.
So now you can see when you actually access this, you are the index, then it shall be displayed our
this message.
Right.
So if you want to change it like here, if you want to add that is the one that means here if you want
to put your H1 tags, I just simply defined as H1 tag and I want to finish it.
So here I just simply finish our H1 tag.
So here I just finish it.
OK, so I just simply finish it.
Now if you can save all.
And now if you refresh it again, yeah, you can see it's now becoming change.
So now here I have created one of the round as indexer here, if you want to change it, like here,
I just found the whole click on the Antares right now.
You can see it's not getting that you.
All right?
So if you want to display this, you are old and you have to do we have to create another URL for this
one.
So here I have already defined our all that you are like here I define that you are the index.
So now if you want to access it with the home like here, I defined that name as a home and for the
home I just simply defined the same name as a views in our index function or shall we call?
And I just put that name as the index which will be needed later.
I will show you how I am actually using it.
So that is our part.
Now I have created.
So now if you click as I save all.
Now our server is perfectly running, so now I have to do and to access it, so now if you want to access
our home, click on the enter.
Yeah, you can see so perfectly now getting that out.
Hello.
All because of all I have already created and that you are as a home.
Right.
So also if you want to use that index right now, click on the enter.
You can see you can also use it.
But I didn't add any home.
That means here if you enter you can see for the home, I didn't find any.
You are so right now one to do and to define another one better.
I just simply copied it and now I take another one.
And for the home, I think you already know about it.
So will be as a blank.
OK, that means blank will be our main trajectory.
So here if you now click as a Savol.
So now I just simply defined as the views and our index and our index.
So that is our name.
So I have already defined our dysfunction.
So now click on the refresh.
Yes.
Now, because your friend now is also getting our home.
You are also for the reasons here I have created another hour.
You are as a whole.
That means our route directly.
And I also created another one of the home and the index.
I hope you will understand about it how that our ideals and how can display your all that view, all
that data.
So now we successfully display all the time out and also display our all that view base.
So here now, if you want to access the index or home.
Yeah, everything is perfectly working.
So friend here, if you want to change it, like here, I have to find one of the one of the function
as an index function and here I call it.
Right, so here into the views I simply defined as the index.
So now if you want to change it like here, I just name it as home right now, OK, just name it as
a home.
And now if you click the save all if not should be work like here if goes up refresh.
Now, you can see it's not getting any better because of all in our are, because of all here, I have
created one of the function as a home function.
But in our view, what else here you can see our viewers, they have another one that is actually the
index.
So I didn't create any function with the index I have created and a function as a home.
Right.
So here, if you want to change it like here, I want to change it as a index to home.
Now click as I save all.
Now, if you refresh it again, yeah, you can see it's not perfectly working.
Next video to discuss about how you can create that multiple function for the multiple page.
So I don't have the only one piece.
And for the only one Dupas, I have created only one function.
Right.
So here I have created only one function as a home.
So if you want to create that multiple function and here if in the load that multiple plays, how can
do that work in our next video?
I will show you that things with the live example.
So friend Dontari is step by step, will go more deep.
So whatever the main core thinks you should know about Python and Django, step by step.
I will show you.
So thanks for watching and I will see you the next video.