Пример #1
0
    def default_user(self):
        user = User(
            email='*****@*****.**',
        )
        db.session.add(user)
        db.session.commit()

        return user
Пример #2
0
    def default_admin(self):
        user = User(
            email='*****@*****.**',
            is_admin=True,
        )
        db.session.add(user)
        db.session.commit()

        return user
Пример #3
0
 def create_user(self, email, **kwargs):
     user = User(email=email, **kwargs)
     db.session.add(user)
     db.session.commit()
     return user