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


Python Page.body方法代码示例

本文整理汇总了Python中pages.Page.body方法的典型用法代码示例。如果您正苦于以下问题:Python Page.body方法的具体用法?Python Page.body怎么用?Python Page.body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pages.Page的用法示例。


在下文中一共展示了Page.body方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.title = "My Page"
     p.css = "css/style.css"
     p.body = "this is the body"
     
     self.response.write(p.whole_page)
开发者ID:Akluba,项目名称:pythonProjects,代码行数:9,代码来源:main.py

示例2: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):
        # create an instance of the page class - creates a page using this class - it will also call the constructor method
        p = Page()
        p.title = "MyPage!"
        p.body = "Miss piggy loves Kermit da Frog"

        self.response.write(p.whole_page)
开发者ID:sgehrke,项目名称:Gehrke_Shaun_DPW,代码行数:9,代码来源:main.py

示例3: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.title = 'My Page!'
     p.css = 'css/style.css'
     p.body = 'Miss Piggy likes Kermit de Frog'
     p.update()
     self.response.write(p.whole_page)
开发者ID:kingmfs14,项目名称:DPW1405,代码行数:9,代码来源:main.py

示例4: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):
    	p = Page()
    	lib = FavoriteMovies() #instance for the FavoriteMovies
        #movie title  (this is part of our assignment, making it user input)
        #year movie was made(this is part of our assignment)(this is our assignment)
        #director of the film (this is part of our assignment)
        #for this demo we will be hard-coding the above three line values do not normally do this
        #page for class (if/else for 2 different page views for assignment)

        md1 = MovieData()
        md1.title = "The Princess Bride"
        md1.year = 1989  #actually calling a function 
        md1.director = "Rob Reiner"
        
        md2 = MovieData()
        md2.title = "Dune"
        md2.year = 1986  #actually calling a function 
        md2.director = "David Lynch"
        

        md3 = MovieData()
        md3.title = "Star Wars"
        md3.year = 1977  #actually calling a function 
        md3.director = "George Lucas"
        

        #lib.calc_time_span()    #adds this to run but we need to add it to the printing out list below
        p.body = lib.compile_list() + lib.calc_time_span() #adds the compile list to the body tag of the html in the page.py
        self.response.write(p.print_out()) #sends the info out to browser as a big string
开发者ID:jnashsiegle,项目名称:JSON-Python,代码行数:31,代码来源:main.py

示例5: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):
        p = Page()
        p.title ="My page"
        p.css ="css/styles.css"
        p.body = "Miss Piggy like Kermit De Frog"

        self.response.write(p.whole_page)
开发者ID:FreeDaGeek,项目名称:DesignPattern,代码行数:9,代码来源:main.py

示例6: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):

        #page for class
        p = Page()
        lib = FavoriteMovies()

        #movie title
        #year movie was made
        #director of the film
        md1 = MovieData()
        md1.title = "The Princess Bride"
        md1.year = 1989 #actually calling a function
        md1.director = "Rob Reiner"
        lib.add_movie(md1)

        md2 = MovieData()
        md2.title = "Dune"
        md2.year = 1986 #actually calling a function
        md2.director = "David Lynch"
        lib.add_movie(md2)

        md2 = MovieData()
        md2.title = "Star wars"
        md2.year = 1977 #actually calling a function
        md2.director = "George Lucas"
        lib.add_movie(md2)

        p.body = lib.compile_list() + lib.calc_time_span()
        self.response.write(p.print_out())

        def main(name, GPA):
        print "The GPA for", name,"is",GPA
        return 0
开发者ID:dellbby,项目名称:dpwp,代码行数:35,代码来源:main.py

示例7: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):

        #page for class
        p = Page()
        lib = FavoriteMovies()  #lib object

        #movie title
        #year movie was made
        #director of film
        md1 = MovieData()
        md1.title = "The Princess Bride"
        md1.year = 1989  #calling a function
        md1.director = "Rob Reiner"
        lib.add_movie(md1)

        md2 = MovieData()
        md2.title = "Dune"
        md2.year = 1986  #calling a function
        md2.director = "David Lynch"
        lib.add_movie(md2)

        md2 = MovieData()
        md2.title = "Star Wars"
        md2.year = 1977  #calling a function
        md2.director = "George Lucas"
        lib.add_movie(md2)

        p.body = lib.compile_list() + lib.calc_time_span()
        #lib.movie_list = [md1, md2] = if it was public
        self.response.write(p.print_out())
开发者ID:LittlefieldBous,项目名称:DP,代码行数:32,代码来源:main.py

示例8: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
    p = Page()
    p.title = 'My Page!'
    p.css = 'css/main.css'
    p.body = "Miss Piggy is aweful!"
    p.update()
    self.response.write(p.whole_page)
开发者ID:TaylorCawiezell,项目名称:DPW,代码行数:9,代码来源:main.py

示例9: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):
        p = Page()
        p.title = "My page!"
        p.css = "css/style.css"
        p.body = "Miss Piggy likes Kermit De Frog!" #modify body element

        self.response.write(p.whole_page)
开发者ID:allisondsharpe,项目名称:dpwp,代码行数:9,代码来源:main.py

示例10: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.title = "My page!" #Setter was created so we could change
     p.css = "css/style.css"
     p.body = "Miss Piggy likes Kermit de Frog!"
     p.update()
     self.response.write(p.whole_page)
开发者ID:NenaH77,项目名称:DPW,代码行数:9,代码来源:main.py

示例11: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     #self.response.write('Hello world!')
     p = Page()
     p.title = "My Page"
     p.css = "css/style.css"
     p.body = "This is Stacy's Python Example"
     #self.response.write(p.print_out())
     p.update()
     self.response.write(p.whole_page)
开发者ID:istacy,项目名称:DesignPatternsWebProgramming,代码行数:11,代码来源:main.py

示例12: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
    def get(self):
        p = Page()
        lib = FavoriteMovies()

        md1 = MovieData()
        md1.title = "The Princess Bride"
        md1.year = 1989  # actually calling a function
        md1.director = "Rob Reiner"
        lib.add_movie(md1)

        md2 = MovieData()
        md2.title = "Dune"
        md2.year = 1986
        md2.director = "David Lynch"
        lib.add_movie(md2)

        md3 = MovieData()
        md3.title = "Star Wars"
        md3.year = 1977
        md3.director = "George Lucus"
        lib.add_movie(md3)

        p.body = lib.compile_list() + lib.calc_time_span()
        self.response.write(p.print_out())
开发者ID:klarski,项目名称:DPWP,代码行数:26,代码来源:main.py

示例13: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.title = "My Page"
     p.body = "Miss Piggy likes Kermit De Frog!"
     self.response.write(p.whole_page)
开发者ID:HeadShotBoom,项目名称:DPWP,代码行数:7,代码来源:main.py

示例14: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.body = "Hello World"
     self.response.write(p.print_out())
开发者ID:cferguson1,项目名称:DPW,代码行数:6,代码来源:main.py

示例15: get

# 需要导入模块: from pages import Page [as 别名]
# 或者: from pages.Page import body [as 别名]
 def get(self):
     p = Page()
     p.title = "My Page!"
     p.css = "css/style.css"
     p.body = "Apples!"
     self.response.write(p.whole_page)
开发者ID:hb08,项目名称:DPWP,代码行数:8,代码来源:main.py


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