标签云

微信群

扫码加入我们

WeChat QR Code

i am using Django Build in PasswordResetView class.i am using Django File backend in settings. i tried to reset password of an existing account and django returns a success but still no email is sent. Here is code for reference:settings.py EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'EMAIL_FILE_PATH = os.path.join(BASE_DIR,'sent_emails')views.pyclass MyPasswordReset(PasswordResetView):email_template_name = 'email/forgot_password.html'form_class = ForgotPasswordfrom_email = '[email protected]'success_url = reverse_lazy('users:password_reset_done')form.pyclass ForgotPassword(PasswordResetForm):email = forms.EmailField(widget=forms.EmailInput(attrs={'class': 'form-control', 'title': 'Enter Email', 'placeholder': 'Email'}), max_length=50, label=False, required=True, )Password Reset Email Templateemail/forgot_password.htmlyou forgot your password!! Sample EmailCode for Complete reference:https://github.com/deepak1725/basicCrud/tree/dk-signup/users


have you configured the email settings?

2019年07月24日42分39秒

Exprator all i did in settings.py is as i mentioned. what else needed..?

2019年07月24日42分39秒

an email server to send the emails, which you need to mention the settings.py

2019年07月24日42分39秒

Exprator i am at local.. using file backend. Expected behavior is make *.log files in my folder sent_emails with email content in it.

2019年07月24日42分39秒