def sign_up(email, name, password): qry = User.query(getattr(User, 'email') == email) if qry.fetch(1): raise UserAlreadyExistsException(email) new_user = User(email=email, name=name, password=password) new_user.put() print(type(new_user.email)) return email
def initData(self): user1 = User() user1.name = 'Johnson' user1.password = User.hash_password('123') user1.put() user2 = User() user2.name = 'john' user2.password = User.hash_password('321') user2.put()