當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。