def isAdministrator(email): q = models.Administrators().all().filter('emailAddress =', email) row = q.fetch(1) if row: return True else: return False
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()
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()
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()
def getMobileNumber(email): q = models.Administrators().all().filter('emailAddress =', email) rows = q.fetch(1) for row in rows: return row.mobileNumber