本文整理汇总了Python中page.Page.footer方法的典型用法代码示例。如果您正苦于以下问题:Python Page.footer方法的具体用法?Python Page.footer怎么用?Python Page.footer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类page.Page
的用法示例。
在下文中一共展示了Page.footer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import footer [as 别名]
def get(self):
#import page
page = Page()
#airJordan Shoe Instance
airj = Shoe()
airj.name = 'Air Jordans'
airj.price = 180 #$
airj.limit = 2 #pairs
airj.img ="http://upload.wikimedia.org/wikipedia/en/3/37/Jumpman_logo.svg"
#nikeFoampositePro Shoe Instance
nfp = Shoe()
nfp.name = 'Nike Foamposite Pro'
nfp.price = 220 #$
nfp.limit = 1 #pairs
nfp.img = "http://upload.wikimedia.org/wikipedia/en/3/37/Jumpman_logo.svg"
#nikeFoampositeOne Shoe Instance
nfo = Shoe()
nfo.name = 'Nike Foamposite One'
nfo.price = 220 #$
nfo.limit = 1 #pairs
nfo.img ="http://upload.wikimedia.org/wikipedia/en/3/37/Jumpman_logo.svg"
#lebron Shoe Instance
leb = Shoe()
leb.name = 'LeBrons'
leb.price = 200 #$
leb.limit = 1 #pairs
leb.img ="http://upload.wikimedia.org/wikipedia/en/3/37/Jumpman_logo.svg"
#kobe Shoe Instance
kobe = Shoe()
kobe.name = 'Kobes'
kobe.price = 120 #$
kobe.limit = 4 #pairs
kobe.img ="http://upload.wikimedia.org/wikipedia/en/3/37/Jumpman_logo.svg"
shoes = [
airj,nfp,nfo,leb,kobe
]
#HTML
self.response.write(page.header())
self.response.write(page.form())
if self.request.GET:
heat = (int(self.request.GET['heat']))-1
print heat
self.response.write(self.html(shoes[heat]))
self.response.write(page.footer())
示例2: get
# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import footer [as 别名]
def get(self):
#import page
page = Page()
#Grape Fruit Instance
gfruit = List()
gfruit.name = 'Grape Fruit'
gfruit.price = 1.26#$
gfruit.need = 1 #bag
gfruit.img ="http://upload.wikimedia.org/wikipedia/en/e/e6/PT-Test.jpg"
#Protein Powder Instance
proteinp = List()
proteinp.name = 'Protein Powder'
proteinp.price = 15 #$
proteinp.need = 1 #Container
proteinp.img = "http://upload.wikimedia.org/wikipedia/en/e/e6/PT-Test.jpg"
#Whole Wheat Bread Instance
wwb = List()
wwb.name = 'Whole Wheat Bread'
wwb.price = 1.50 #$
wwb.need = 2 #loaf
wwb.img ="http://upload.wikimedia.org/wikipedia/en/e/e6/PT-Test.jpg"
#Eggs Instance
eggs = List()
eggs.name = 'Eggs'
eggs.price = 1 #$
eggs.need = 1 #carton
eggs.img ="http://upload.wikimedia.org/wikipedia/en/e/e6/PT-Test.jpg"
#Water Instance
water = List()
water.name = 'Water'
water.price = 5 #$
water.need = 1 #cases 24 pack
water.img ="http://upload.wikimedia.org/wikipedia/en/e/e6/PT-Test.jpg"
#Grocery List Items Array
glist = [
gfruit,proteinp,wwb,eggs,water
]
#HTML
self.response.write(page.header())
self.response.write(page.form())
if self.request.GET:
shop = (int(self.request.GET['shop']))-1
print shop
self.response.write(self.html(glist[shop]))
self.response.write(page.footer())
示例3: get
# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import footer [as 别名]
def get(self):
p = Page()
ji = FamilyMember()
ji.name = "Jason"
ji.status = "father"
ji.water_morning = 50
ji.water_afternoon = 30
ji.water_evening = 30
ka = FamilyMember()
ka.name = "Katie"
ka.status = "mother"
ka.water_morning = 30
ka.water_afternoon = 30
ka.water_evening = 20
ij = FamilyMember()
ij.name = "Isaac"
ij.status = "son"
ij.water_morning = 20
ij.water_afternoon = 20
ij.water_evening = 40
ea = FamilyMember()
ea.name = "Ella"
ea.status = "daughter"
ea.water_morning = 10
ea.water_afternoon = 20
ea.water_evening = 20
ch = FamilyMember()
ch.name = "Chewie"
ch.status = "dog1"
ch.water_morning = 3
ch.water_afternoon = 4
ch.water_evening = 2
ot = FamilyMember()
ot.name = "Otis"
ot.status = "dog2"
ot.water_morning = 4
ot.water_afternoon = 4
ot.water_evening = 3
members = [ji, ka, ij, ea, ch, ot]
self.response.write(p.header())
self.response.write(p.form())
if self.request.GET:
member = (int(self.request.GET['member']))-1
print member
self.response.write(self.html(members[member]))
self.response.write(p.footer())
示例4: get
# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import footer [as 别名]
def get(self):
page = Page() # creates an instance of the Page function which is defined at library.py
mike = Person(5555) # Password for his/her voicemail
mike.name = "Mike Taatgen" # Name of the user
mike.text = 45 #Amount of text send
mike.minutes = 300 # Amount of minutes talked on the phone
mike.internet = 2 # Amount of GB used for data
anthony = Person(5235) # Password for his/her voicemail
anthony.name = "Anthony Kluba" # Name of the user
anthony.text = 25 #Amount of text send
anthony.minutes = 325 # Amount of minutes talked on the phone
anthony.internet = 7.2 # Amount of GB used for data
nate = Person(1821) # Password for his/her voicemail
nate.name = "Nathan Dickison" # Name of the user
nate.text = 75 #Amount of text send
nate.minutes = 290 # Amount of minutes talked on the phone
nate.internet = 3.2 # Amount of GB used for data
jairo = Person(8371) # Password for his/her voicemail
jairo.name = "Jairo Jurado" # Name of the user
jairo.text = 25 #Amount of text send
jairo.minutes = 400 # Amount of minutes talked on the phone
jairo.internet = 6 # Amount of GB used for data
rebecca = Person(9213) # Password for his/her voicemail
rebecca.name = "Rebecca Carroll" # Name of the user
rebecca.text = 49 #Amount of text send
rebecca.minutes = 280 # Amount of minutes talked on the phone
rebecca.internet = 4 # Amount of GB used for data
players = [mike,anthony,nate,jairo,rebecca] #array with all the players
self.response.write(page.header()) # Creates the HTML attributes
self.response.write(page.form())
if self.request.GET:
player = int(self.request.GET['person'])-1 #because index start at 0
self.response.write(self.html(players[player]))
self.response.write(page.footer())