Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 def get(self):
     p = Page()
     p.title = "My Page"
     p.css = "/css/style.css"
     p.body = "Changer"
     p.update()
     self.response.write(p.whole_page)
Beispiel #4
0
 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)
Beispiel #5
0
 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)
 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)
Beispiel #7
0
    def get(self):
        # Establishes variables to allow interaction with designated class.
        a1 = Snake()
        a2 = Bird()
        a3 = Person()
        # Stores all animals defined in object
        self.animals = [a1, a2, a3]
        # Defines p as referring to Page class
        p = Page()
        # Runs the update command on page to concatinate the first pages info
        p.update()

        # Listens for an occurance of animal in the browsers request. Essentially listening for a button click
        if "animal" in self.request.GET:
            # Sets current animals value based on which request was made
            p.current_animal = self.animals[int(self.request.GET["animal"])]
            # Changes the Title of the page to match the selected animal
            p.title = self.animals[int(self.request.GET["animal"])].name
            # plays the sound specific for that animal
            p.loud_noises = self.animals[int(self.request.GET["animal"])].sound
            # Writes contents of whole page to the browser. The update function assembles this
            self.response.write(p.whole_page)
        else:
            self.response.write(p.whole_page)
Beispiel #8
0
    def get(self):
        h = hello()
        p = Page()
        p.title = "My New Page"
        p.css = "css/styles.css"
        p.update() #referencing my update class from pages
        h.update_this()

        # I will create an application that calculates the remaining storage for different users

        #now I will hard code the values for each data object



        m = Storage()
        m.pictures = 5
        m.videos = 10
        m.documents = 1
        m.music = 3
        m.apps = 4

        #write the values to the page

        if self.request.GET:
            total = self.request.GET['totalStorage']
            self.response.write(h.user_page_update + "Total storage used is  " + total + " GB <br/> There is  " + str(m.final_storage) + " GB of storage remaining")

        else:
            self.response.write(p.user_page)  #writing the user_page which has has all the html for my application

    #now I am going create the remaining users

        #now I will hard code the values for each data object
        t = Storage()
        t.pictures = 10
        t.videos = 10
        t.documents = 1
        t.music = 20
        t.apps = 7
        #write the values to the page
        # self.response.write(" <br/> Todd has  " + str(t.final_storage) + " GB of storage remaining") #writing the user_page which has has all the html for my application





#now I will hard code the values for each data object
        n = Storage()
        n.pictures = 1
        n.videos = 4
        n.documents = 1
        n.music = 9
        n.apps = 7
        #write the values to the page
        # self.response.write(" <br/> Nancy has  " + str(n.final_storage) + " GB of storage remaining") #writing the user_page which has has all the html for my application


#now I will hard code the values for each data object
        h = Storage()
        h.pictures = 18
        h.videos = 10
        h.documents = 1
        h.music = 6
        h.apps = 7
        #write the values to the page
        # self.response.write(" <br/> Henry has  " + str(h.final_storage) + " GB of storage remaining") #writing the user_page which has has all the html for my application


#now I will hard code the values for each data object
        j = Storage()
        j.pictures = 6
        j.videos = 4
        j.documents = 1
        j.music = 7
        j.apps = 2
 def get(self):
     p = Page()
     p.title = "My page!"
     p.css = "css/styles.css"
     p.update()
     self.response.write(p.whole_page)
Beispiel #10
0
 def get(self):
     p = Page()
     p.title = "my page"
     p.body = "Miss piggy likes Kermit the Frog"
     p.update()
     self.response.write(p.whole_page)