Пример #1
0
 def run(self):
     user = User(username='******')
     user.password = '******'
     role = Role(name='admin', description='for system admins')
     user.roles.append(role)
     self.db.session.add(user)
     self.db.session.commit()
Пример #2
0
 def run(self):
     user = User(username='******')
     user.password = '******'
     self.db.session.add(user)
     self.db.session.commit()