def register(cls, username, pw, email = None): pw_hash = hashing.make_pw_hash(username, pw) return User(parent = hashing.users_key(), username = username, password = pw_hash, email = email)
def by_id(cls, uid): return cls.get_by_id(uid, parent = hashing.users_key())