我正在尝试为Airflow设置登录页面。尝试使用(user.password ='set_the_password')更新密码时出现错误
遇到错误
nbytes
有人可以帮我吗?谢谢。
答案 0 :(得分:0)
在python
解释器中尝试以下操作:
import airflow
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser
user = PasswordUser(models.User())
user.username = 'USERNAME'
user.email = 'EMAIL'
user._set_password = 'PASSWORD'.encode('utf8')
session = settings.Session()
session.add(user)
session.commit()
session.close()