Need up to 30 seconds to load.
hello friends welcome to my channel this
is Sharon in this video I will show you
how to add the multiple HTML pages and
how to configure the URL path roti in
python using jungle web framework if you
are a first-time visitor to my channel
please subscribe to get the latest
updates before continuing this video
tutorial I sincerely recommend please
watch my previous video tutorials in
that tutorials I have shown how to
install the jungle the framework on
Windows operating system and how to
create a new web project in Django now
let's continue the tradition to Tory
Allah and news and visual studio code to
run the Python code a notice in the
expert panel I have added my Python
project which is a Python Django
let's expand that one in this folder I
have created my project let me expand
that one and if you notice in my project
there are some default Python files and
one BB dot SQL database and these are
the files is automatically installed
when I create a project in Django now
first I want to add the multiple
experiment areas so let's create a new
template folder to add our HTML pages I
am adding that camford folder to the
root folder and my project I'll
right-click the my project click new
folder and the folder name is template
so once I have the template folder
right-click the template folder click
new file and the files I'm adding the
HTML page name is page 1 dot HTML
and here we got the HTML page one let's
add some html5 code
doctype and closing the HTML tag inside
the HTML I am adding the header section
this header section I'm adding that
title card
the title is this is page one after the
header tag I'm adding the body section
dy in the body section I am adding the
header tag which condense this is that
change Y now let's add the another HTML
page again worked with the template
click new file where the page name is
his name is page two dot HTML and here
we got the page two daughters channel
what I'm doing and stuff writing the
same code and copying this part and
pissing in this paste you got a sh t ml
so I'm changing the title which is the
this is page two and the content I'm
adding the Hedgehog nice this is the
page two
now let's add the third the parish I
keep the camper polar again both new
file and page three dot HTML so ever I
am pasting the doctype this is phase
three and the hash returns an ID in the
web page there
now we've got three back pages how
created in this chamber for now
now the next step is ad service file
save all
now the next step and adding a new
Python file to call this a statement
failures so in the my project I turn to
my project click new fun I'm adding the
index dot P while it is a Python file
now in this Python file first on
importing from Django dot is to DP
import HTTP response and the next I am
importing from Django dot shot cards in
port niranda now after importing these
two packages
three functions to call the free
estimate pages declare the death
decision that phase 1 it is a function
name request I'm requesting the request
Colin then I'm returning this function
render method this when a method on
adding and this sender method takes of
parameters the first ones are requested
so I'm adding the request comma
and the second time it is a Catholic
name so first attempt at me means within
single quotes page one this one page one
dot HTML page one let's copy this one
let's create the second function let's
give the function name which is the page
two and I want to render page two dot
HTML this page f stickler the another
method the method name is the page 3 and
the Tampa Bay means page 3 dot HTML
that's it once we added our templates in
this indexed or Python page let's serve
this file again say all after now we
have just added that three HTML pages in
the templates folder and we have created
from Python file to render our HTML
pages in this presentation
now the tell stories in the my project
notice there is a reorder Pui let's open
that one so let's add a whole path from
dot import I am importing the index page
Python page ingots from this index page
I am calling these methods web page one
to page two and page three I don't
require this default path let's create
the new path single course
, index dot the Python page name dot
notice here we've got the metal names
for page 1 comma let's copy this one
pressure and pressure this is purpose 2
and this is fantastic this one is a page
2
this one is page 3 so after adding the
path in the urine patterns now the next
important step is serving stop leave I
open that one and notice in the sudden
sake why there is a template such on
which contents are dieters de IR as
which contains some empty brackets so in
that we need to add oil stock path dot
join method now in this join methyl and
adding the base directory Vince amis
code directory comma and the second one
is a string path resume course I'm
adding the templates
let's add the Templars give this name as
a template rename tablets not service
file sale so this file save all and the
open page will not it's Jim - here in
the h1 section I'm adding itself is
equals to I'm adding page to dot HTML go
to page two let's copy this one Chris
yeah and this one is page three you go
to page three and in the page three
I'm adding page one go to page one which
is on home page default page which we
have added in the URLs see the web page
one does not contain any value here
which means it's a default home page now
let's check the output opens view let's
open the command big of console switch
to the terminal
and notice here I've got my base path
which I have created my closet the
folder main Python Django and the D
Drive so in the Python jungle be how
that subfolder called my project so CD
my project nice color M is capital my
project
after adding the folder name now let's
run our server item server iPhone
managed or py let's add a line line in
stock p1 a1 server enter and notice here
I got a message identified no issues and
this is our webserver name click the
control and click the mouse see here we
got the output oops I forgot to say that
file save all so now we will get this go
to page extra filter I'm reloading the
browser see here we got this is web page
1 which is our home page go to page 2
the heck shuffling and I click go to
page 2 so here we got a message page not
for the reason here in our URLs I have
added page 2
so now we got of that pistol this is so
to fix this we need to add yeah comma
the third parameter is a name name is
equals to between single cause I'm
adding that case one and let's add the
name property for the second of his name
sameen comma name is equals to between
single quotes I'm adding repairs to and
add the name attribute for de the pasty
also between glucose and adding web page
trick now let's configure the page 1 the
H laugh when I click this go to phase 2
I want to read that about paste you got
a streamer page so instead of writing
the extremal page name an alga curly
braces the expression percentage between
this percentage I'm adding URL and sink
odds now between the single cuts I'm
adding this line that pays to
I'm adding the name attribute that they
store so let's copy this one it's just
to the Pens - da - TM l did it this one
this is the first three remember we have
to add this name attribute which is the
pastry here I have added because I want
to go to web page 3 and in the page 3
this is the page on
now let's say these files save all now
let's go to page two so you have a
redacted of that page - Lori sell the
place turn now let's click the go to
page three see how they redacted other
places now let's go to page one which is
return to the home page go to page two
this is webpage to go to page three this
is web page three
now go to page one this is the page one
that's it