Beispiel #1
0
def create_guest_user():
    """ Create a guest user if it doesn't exist """
    if not User.query.filter_by(name='guest').count():
        user = UserFactory()
        user.name = 'guest'
        user.email = '*****@*****.**'
        user.set_password('53CR3t_p4zZW0rD')
        user.role = Role.query.filter_by(name='Guest').first().id
        user.language = 'en'
        user.save()
Beispiel #2
0
def create_guest_user():
    """ Create a guest user if it doesn't exist """
    if not User.query.filter_by(name='guest').count():
        user = UserFactory()
        user.name = 'guest'
        user.email = '*****@*****.**'
        user.set_password('53CR3t_p4zZW0rD')
        user.role_id = Role.query.filter_by(name='Guest').first().id
        user.language = 'en'
        user.save()
Beispiel #3
0
def create_admin_user():
    """ Create an admin user if it doesn't exist """
    if not User.query.filter_by(name='admin').count():
        user = UserFactory()
        user.name = 'admin'
        user.set_password('53CR3t_p4zZW0rD')
        user.language = 'en'
        user.save()
        user.role = Role.query.filter_by(name='Admin').first().id
        user.save()
Beispiel #4
0
def create_admin_user():
    """ Create an admin user if it doesn't exist """
    if not User.query.filter_by(name='admin').count():
        user = UserFactory()
        user.name = 'admin'
        user.set_password('53CR3t_p4zZW0rD')
        user.language = 'en'
        user.save()
        user.role_id = Role.query.filter_by(name='Admin').first().id
        user.save()