def create(email, password):
    """ Creates a new user record """
    with get_app().app_context():
        user = User(email=email, password=password)
        result = user_service.save(user)
        if not isinstance(result, User):
            print_validation_errors(result)
            return

        click.echo(green('\nUser created:'))
        click.echo(green('-' * 40))
        click.echo(str(user) + '\n')
def create ( email , password ) : with get_app ( ) . app_context ( ) : user = User ( email = email , password = password ) result = user_service . save ( user ) if not isinstance ( result , User ) : print_validation_errors ( result ) return click . echo ( green ( '\nUser created:' ) ) click . echo ( green ( '-' * 40 ) ) click . echo ( str ( user ) + '\n' )
Creates a new user record