Exemple #1
0
    def get(self):
        user = p.getUser()
        pageContents = ""

        if not user:
            pageContents = p.getLoginPage(url)
        else:
            email = user.email()
            pageContents = generatePage(ndb.forceAccount(email))

        self.response.write(p.getHeader(page, url))

        if itemNo != -1:
            self.response.write(p.getSettingHeadings(itemNo))

        self.response.write(p.getContents(pageContents))

        self.response.write(p.getFooter())
Exemple #2
0
    def post(self):
        user = p.getUser()
        pageContents = ""

        gps = "Not available."
        if self.request.get('location') != "":
            gps = self.request.get('location').split(" ")

        if not user:
            pageContents = p.getLoginPage(url)
        else:
            email = user.email()
            pageContents = generatePage(ndb.forceAccount(email), gps)

        self.response.write(p.getHeader(page, url))

        if itemNo != -1:
            self.response.write(p.getRunHeadings(itemNo))

        self.response.write(p.getContents(pageContents))

        self.response.write(p.getFooter())