equal
deleted
inserted
replaced
43 |
43 |
44 DEF_INVITATION_MSG_FMT = ugettext_lazy( |
44 DEF_INVITATION_MSG_FMT = ugettext_lazy( |
45 "Invitation to become a %(role)s for %(group)s.") |
45 "Invitation to become a %(role)s for %(group)s.") |
46 |
46 |
47 DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,") |
47 DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,") |
|
48 |
48 |
49 |
49 def sendInviteNotification(entity): |
50 def sendInviteNotification(entity): |
50 """Sends out an invite notification to the user the request is for. |
51 """Sends out an invite notification to the user the request is for. |
51 |
52 |
52 Args: |
53 Args: |
101 # create and put a new notification in the datastore |
102 # create and put a new notification in the datastore |
102 notification_logic = model_logic.notification.logic |
103 notification_logic = model_logic.notification.logic |
103 notification_logic.updateOrCreateFromFields(fields, |
104 notification_logic.updateOrCreateFromFields(fields, |
104 notification_logic.getKeyFieldsFromDict(fields)) |
105 notification_logic.getKeyFieldsFromDict(fields)) |
105 |
106 |
|
107 |
106 def sendNewNotificationMessage(notification_entity): |
108 def sendNewNotificationMessage(notification_entity): |
107 """Sends an email to a user about a new notification |
109 """Sends an email to a user about a new notification |
108 |
110 |
109 Args: |
111 Args: |
110 notification_entity: Notification about which the message should be sent |
112 notification_entity: Notification about which the message should be sent |
138 |
140 |
139 # send out the message using the default new notification template |
141 # send out the message using the default new notification template |
140 mail_dispatcher.sendMailFromTemplate('soc/mail/new_notification.html', |
142 mail_dispatcher.sendMailFromTemplate('soc/mail/new_notification.html', |
141 messageProperties) |
143 messageProperties) |
142 |
144 |
|
145 |
143 def sendWelcomeMessage(user_entity): |
146 def sendWelcomeMessage(user_entity): |
144 """Sends out a welcome message to a user. |
147 """Sends out a welcome message to a user. |
145 |
148 |
146 Args: |
149 Args: |
147 user_entity: User entity which the message should be send to |
150 user_entity: User entity which the message should be send to |