本文整理匯總了Python中pages.Page.format_all方法的典型用法代碼示例。如果您正苦於以下問題:Python Page.format_all方法的具體用法?Python Page.format_all怎麽用?Python Page.format_all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pages.Page
的用法示例。
在下文中一共展示了Page.format_all方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get
# 需要導入模塊: from pages import Page [as 別名]
# 或者: from pages.Page import format_all [as 別名]
def get(self): #indent here. This function starts everything. below is html5 within the python there is a page head, body and close definied by '''.
p = Page() #I want to make an instance
p.format_all()
if self.request.GET: #has to be in handler
#stores info we got from the form
f_name = self.request.GET['f_name'] #needs variables to work
l_name = self.request.GET['l_name'] #needs variables to work
address = self.request.GET['address']
state = self.request.GET['state']
zip = self.request.GET['zip']
email = self.request.GET['email']
p.email = email
content = self.request.GET['content']
#terms = self.request.GET['terms']
#dropdown = self.request.GET['terms']
self.response.write(p.head + ' ' + p.body + "<div id='wrapper'>"+ "<h3>" "Congratulations on becoming a member of Veronica Vineyards!" + "</h3>" + ' ' + "<div id='name'>" + f_name + ' ' + l_name + "</div>" + "<div id='contact'>" + address + "</div>" + "<div id='state_zip'>" + ' ' + state + ' ' + zip + "</div>" + ' ' + "</br>" + "Look for your email confirmation at:" + ' ' + email + ' ' + "If errors occurred or you would like to update your address please contact us at [email protected]" + "</div>" + p.close) #this is what I want printed whe returned...I'm not sure how to do the css for this?
else:
self.response.write(p.head + p.body + p.close) #prints the information on the page