Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add ability to pass extra context when rendering email templates #82

Merged
merged 2 commits into from May 28, 2021
Merged

Add ability to pass extra context when rendering email templates #82

merged 2 commits into from May 28, 2021

Conversation

gingrassia
Copy link
Contributor

It would be really useful to be able to send extra context when building the email, that way we can have our custom email template with more things other than the token

@psagers
Copy link
Member

psagers commented May 27, 2021

Sounds reasonable, thanks. Just missing a bit of documentation. Updating the docstring for autodoc would be a good start, plus perhaps a mention in the OTP_EMAIL_BODY_TEMPLATE* settings.

@gingrassia
Copy link
Contributor Author

Sounds reasonable, thanks. Just missing a bit of documentation. Updating the docstring for autodoc would be a good start, plus perhaps a mention in the OTP_EMAIL_BODY_TEMPLATE* settings.

hi @psagers, I added some docs, but I wasn't able to verify that docs under generate_challenge were properly rendered... would you mind trying yourself or telling me how to do it? I did make html under docs folder and then serve it but this is what I got
image

@psagers psagers merged commit 8d2c117 into django-otp:master May 28, 2021
@psagers
Copy link
Member

psagers commented May 28, 2021

Version 1.0.6

@gingrassia
Copy link
Contributor Author

thanks @psagers!

@gingrassia gingrassia deleted the ft/emailextras branch May 28, 2021 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants