视图.py:
user = User.objects.create_user(username=username, email=email)
user.password=password1
#user.set_password(password1)
user.save()
模型.py:
def create_user_profile(sender, instance, created, **kwargs):
if created:
#here i want user password unencrypted where I pass that parameter to this
signal
post_save.connect(create_user_profile, sender=User)