-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define two class attributes to customise notifications
* `password_reset_notification` * `validation_notification`
- Loading branch information
Kevin Etienne
committed
Mar 13, 2015
1 parent
4a461ea
commit e2387e6
Showing
5 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from user_management.utils.notifications import PasswordResetNotification | ||
|
||
|
||
class CustomPasswordResetNotification(PasswordResetNotification): | ||
"""Test setting a custom notification to alter how we send the password reset.""" | ||
text_email_template = 'my_cystom_email.txt' | ||
html_email_template = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a nice solution. Since we always define a custom
User
, we don't need to add anAppConfig
or anysettings
. 👍