4
views.py 인수를 전달하는 방법 :신호에
user = User.objects.create_user(username=username, email=email)
user.password=password1
#user.set_password(password1)
user.save()
models.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)
주처럼 뭔가를 할 수 있습니다. 사실적으로 당신은 보낸 사람으로 아무것도 전달할 수 있지만 장고 자체와 같은 방식으로 이것을하는 것이 좋습니다. – simplylizz
@simplylizz 네, 고맙습니다. 고마워요. – xiaowl