当前位置: 首页>>代码示例>>Python>>正文


Python Page.format_all方法代码示例

本文整理汇总了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
开发者ID:LittlefieldBous,项目名称:DP,代码行数:21,代码来源:main.py


注:本文中的pages.Page.format_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。