Exemple #1
0
    def post(self):
        email = p.getUser().email()

        autohide = False
        if (self.request.get('autohide') == "True"):
            autohide = True

        ndb.updateAccount(email, autohide, "NA")
        time.sleep(0.1)
        self.redirect(url)
Exemple #2
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())
    def post(self):
        email = p.getUser().email()

        name = self.request.get('name')
        newName = name
        type = self.request.get('type')
        gpsLat = float(self.request.get('gpsLat'))
        gpsLong = float(self.request.get('gpsLong'))
        gpsRange = int(self.request.get('gpsRange'))
        profileName = self.request.get('profileNameX')

        profile = ndb.checkForLocation(email, name)
        if profile:
            ndb.updateLocation(email, name, newName, type, gpsLat, gpsLong, gpsRange, profileName)
        else:
            ndb.createLocationData(email, name, type, gpsLat, gpsLong, gpsRange, profileName)
        time.sleep(0.1)
        self.redirect(url)
Exemple #4
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())
Exemple #5
0
    def post(self):
        email = p.getUser().email()

        name = self.request.get('name')
        newName = name
        type = self.request.get('type')

        lines = self.request.get('sites')
        sites = [l for l in lines.split("\n") if l]

        playlist = self.request.get('playlist')
        default = False

        if (self.request.get('defaultProfile') == "True"):
            default = True

        profile = ndb.checkForProfile(email, name)
        if profile:
            ndb.updateProfile(email, name, newName, type, sites, playlist, default)
        else:
            ndb.createProfileData(email, name, type, sites, playlist, default)
        time.sleep(0.1)
        self.redirect(url)
Exemple #6
0
 def post(self):
     name = self.request.get('name')
     email = p.getUser().email()
     ndb.deleteProfile(name, email)
     time.sleep(0.1)
     self.redirect(url)