def create_user():
"""Create Remote User."""
email = prompt("Email ")
passw = getpass("Password: ")
active = prompt("Activate (y/n): ")
if len(passw) < 6:
print(red("Password length greather than 6 catacters."))
return
if active != "y" or active != "n":
active = "y"
with cd(remote_app_dir):
sudo("source env-{{NAMEPROJECT}}/bin/activate && python {{NAMEPROJECT}}/manage.py create_user -n {} -p {} -a {}".format(email,
passw,
active
))
print(green("Creted User."))
评论列表
文章目录