Example #1
0
def generatePage(account, gps):
    pageContents = p.getRow(p.getGPSBox(gps))

    pageContents += p.getRow(ndb.printNewLocationForm(account.email))

    # print all current locations
    locations = ndb.getAllLocations(account.email)
    for location in locations:
        pageContents += p.getRow(ndb.printCurrentLocationForm(location))

    return pageContents
Example #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;