43 |
43 |
44 DEF_NEW_NOTIFICATION_MSG = ugettext_lazy( |
44 DEF_NEW_NOTIFICATION_MSG = ugettext_lazy( |
45 "You have received a new Notification.") |
45 "You have received a new Notification.") |
46 |
46 |
47 DEF_INVITATION_MSG_FMT = ugettext_lazy( |
47 DEF_INVITATION_MSG_FMT = ugettext_lazy( |
48 "Invitation to become a %(role)s for %(group)s.") |
48 "Invitation to become a %(role_verbose)s for %(group)s.") |
49 |
49 |
50 DEF_NEW_CLUB_MSG_FMT = ugettext_lazy( |
50 DEF_NEW_CLUB_MSG_FMT = ugettext_lazy( |
51 "Your club application for %(name)s has been accepted.") |
51 "Your club application for %(name)s has been accepted.") |
52 |
52 |
53 DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,") |
53 DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,") |
68 properties = {'link_id': entity.link_id } |
68 properties = {'link_id': entity.link_id } |
69 to_user = model_logic.user.logic.getForFields(properties, unique=True) |
69 to_user = model_logic.user.logic.getForFields(properties, unique=True) |
70 |
70 |
71 invitation_url = "http://%(host)s%(index)s" % { |
71 invitation_url = "http://%(host)s%(index)s" % { |
72 'host' : os.environ['HTTP_HOST'], |
72 'host' : os.environ['HTTP_HOST'], |
73 'index': redirects.inviteAcceptedRedirect(entity, None), |
73 'index': redirects.inviteProcessRedirect(entity, None), |
74 } |
74 } |
75 |
75 |
76 message_properties = { |
76 message_properties = { |
77 'role': entity.role, |
77 'role_verbose' : entity.role_verbose, |
78 'group': entity.scope.name, |
78 'group': entity.scope.name, |
79 'invitation_url': invitation_url, |
79 'invitation_url': invitation_url, |
80 } |
80 } |
81 |
81 |
82 subject = DEF_INVITATION_MSG_FMT % { |
82 subject = DEF_INVITATION_MSG_FMT % { |
83 'role' : entity.role, |
83 'role_verbose' : entity.role_verbose, |
84 'group' : entity.scope.name |
84 'group' : entity.scope.name |
85 } |
85 } |
86 |
86 |
87 template = DEF_GROUP_INVITE_NOTIFICATION_TEMPLATE |
87 template = DEF_GROUP_INVITE_NOTIFICATION_TEMPLATE |
88 |
88 |