Ejemplo n.º 1
0
def isAdministrator(email):
    q = models.Administrators().all().filter('emailAddress =', email)
    row = q.fetch(1)
    if row:
        return True
    else:
        return False
Ejemplo n.º 2
0
def addMobileNumber(emailAddress, mobileNumber):
    rows = models.Subscriptions().all().filter('emailAddress =', emailAddress)
    for row in rows:
        row.mobileNumber = mobileNumber
        row.put()
    q = models.Administrators().all().filter('emailAddress =', emailAddress)

    for value in q:
        value.mobileNumber = mobileNumber
        value.put()
Ejemplo n.º 3
0
def addSubdomainFromEmail(email, subdomain):
    q = models.Administrators().all().filter('emailAddress =', email).fetch(1)

    for row in q:
        domain = row.domain
    key = subdomain
    row = models.SubDomains(key_name=key)
    row.domain = domain
    row.subdomain = subdomain
    row.put()
Ejemplo n.º 4
0
def signUp(emailAddress, domain, mobileNumber, firstName, secondName,
           countryName):
    key = domain
    row = models.Administrators(key_name=key)
    row.emailAddress = emailAddress
    row.domain = domain
    row.mobileNumber = mobileNumber
    row.firstName = firstName
    row.secondName = secondName
    row.countryName = countryName
    row.put()
Ejemplo n.º 5
0
def getMobileNumber(email):
    q = models.Administrators().all().filter('emailAddress =', email)
    rows = q.fetch(1)
    for row in rows:
        return row.mobileNumber