Hi I’d like to send password reset emails from within the user admin and have an action set up.
I can’t determine if it’s possible to use the password_reset view. Can I loop over the queryset using the view to generate the token and send the email?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Subclass UserAdmin, you can import it from
django.contrib.auth.adminAdd the action you added, use PasswordResetForm by reverse engineering the password_reset view.
Unregister User from admin.site,
admin.site.register(User)Register your subclass as the modeladmin for User
Here’s an example (thanks Chris Pratt for pushing the use of unregister/register):