I very new to django. I'm working in resetting password through email in django. I'm using all the 4 default class views. I can get upto PasswordResetDoneView where the page saying instructions have been sent to my mail. But I haven't received any mail.
Urls.py
from django.urls import path
from . import views
from django.contrib.auth.views import (
LoginView,LogoutView,PasswordResetView,PasswordResetDoneView,PasswordResetConfirmView,PasswordResetCompleteView
)
urlpatterns=[
path('',views.home),
path('login/',LoginView.as_view(template_name='accounts/login.html'),name='login page'),
path('logout/',LogoutView.as_view(template_name='accounts/logout.html'),name='logout page'),
path('register/',views.registration,name='register page'),
path('profile/',views.profile,name='profile'),
path('profile/edit_profile/',views.edit_profile,name='edit-profile'),
path('profile/change-password/',views.change_password,name='edit-profile'),
path('profile/reset-password/',PasswordResetView.as_view(),name='paassword_reset_view'),
path('profile/reset-password/done/',PasswordResetDoneView.as_view(),name='password_reset_done'),
path('profile/reset-password/confirm/<uidb64>/<token>/',PasswordResetConfirmView.as_view(),name='password_reset_confirm'),
path('profile/reset-password/complete/',PasswordResetCompleteView.as_view(),name='password_reset_complete'),
]
Also I have configured the settings.py file with the necessary configurations. I have also enabled the less secure option for the mail from which I'm sending the url. setting.py
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails")
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'Password'
Also tried using send_mail separately in the shell. It returns 1.
Hoping for a solution
Thanks in advance