On our django based site only the admin can create new user but he can not set any password and i have used email_new_user function. So on new user creation an email is sent with password reset link.
this is how my function in models.py look like :-
def email_new_user(sender, **kwargs):
print kwargs
if kwargs["created"]:
new_user = kwargs["instance"]
send_mail('Set Your Password', 'http://127.0.0.1:8000/accounts/password/reset/', 'from_email',[new_user.email], fail_silently=False)
post_save.connect(email_new_user, sender=User)
but i want to know what do i need to write on the place of SEND_EMAIL() function so that i can directly send the password_reset_confirm_email to the newly created user on the place of sending him this url where he can enter his email address in order to get the password reset confirm email.