Esempio n. 1
0
def generatePage(account):
    content = ""
    profiles = ndb.getAllProfiles(account.email)
    for profile in profiles:
        content += ndb.printProfileList(profile, False)
    if content == "":
        content += ndb.noProfiles(0)

    return p.getRow(content)
Esempio n. 2
0
def generatePage(account, gps):
    pageContents = p.getRow(p.getGPSBox(gps))
    error = 0
    if gps != "Not available.":
        profile = ndb.getGPSProfile(account.email, gps)
        error = 2
    else:
        profile = ndb.getDefaultProfile(account.email)
        error = 1
    if profile:
        pageContents += "<script>" + rs.generateProfileScript(profile) + "</script>"
        pageContents += "<br/><div class='text-center'><h4>Profile <em>" + profile.name + "</em> has been executed!</h4></div>"
        pageContents += p.getRow(ndb.printProfileList(profile, True))
    else:
        pageContents += ndb.noProfiles(error)
    return pageContents;