Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow empty from_email param #131
base: develop
Are you sure you want to change the base?
Allow empty from_email param #131
Changes from 7 commits
0e8826a
ab7e45b
81a42e3
4a27619
158559e
5f8a213
84e78da
70692db
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add a section with all the available settings and their descriptions. Check the ones mentioned in README, check the ones used in code, and add a new section to README above "Class Based Views" section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Then I think this overrides list can be removed to concentrate the params in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific list should be kept because it's the params of the CBV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I've misread your previous text. Ignore my suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have also a
TEMPLATED_EMAIL_FROM_EMAIL
setting.A user thought this was a default. See: #97 (comment)
So I think this should read:
from_email = from_email or settings.TEMPLATED_EMAIL_FROM_EMAIL or settings.DEFAULT_FROM_EMAIL
Also, check again the README, see if this is well explained. And check where
TEMPLATED_EMAIL_FROM_EMAIL
is being used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've seen, this
TEMPLATED_EMAIL_FROM_EMAIL
is used only by the Class-based mixin. It's documentation is written here. While it's not saying explicitly that the setting is not required, it does not specify that it'll fall back toDEFAULT_FROM_MAIL
. I think this could be updated.I'm not sure, however, if we should put it as a default in the vanilla-django file, since this class-based mixin is like a wrapper over the vanilla and the docs specific that this setting is used only by the class-based view approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make the backend use this setting
TEMPLATED_EMAIL_FROM_EMAIL
. Sofrom_email = from_email or settings.TEMPLATED_EMAIL_FROM_EMAIL or settings.DEFAULT_FROM_EMAIL
seems fine for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjsj I've updated the vanilla backend and added a note about this behavior in the readme.