Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TEMPLATE DOES NOT EXIST #641

Open
adupatil opened this issue Mar 25, 2021 · 0 comments
Open

TEMPLATE DOES NOT EXIST #641

adupatil opened this issue Mar 25, 2021 · 0 comments

Comments

@adupatil
Copy link

I have overridden Django-rest-auth PasswordResetSerializer

code:
class CustomPasswordResetSerializer(PasswordResetSerializer):
def get_email_options(self):
return {
'email_template_name': 'password_reset_email.html'
}

settings.py
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '../frontend','../users/templates/users/registration')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

REST_AUTH_SERIALIZERS= {
'PASSWORD_RESET_SERIALIZER': 'users.serializers.CustomPasswordResetSerializer',
}
Even after providing a path for the custom template it shows template not found

please help!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant