Revision 466cc12c snf-astakos-app/astakos/im/project_notif.py

b/snf-astakos-app/astakos/im/project_notif.py
10 10
    'template': 'im/projects/project_membership_change_notification.txt',
11 11
    }
12 12

  
13
MEM_ENROLL_NOTIF = {
14
    'subject' : _(settings.PROJECT_MEMBERSHIP_ENROLL_SUBJECT),
15
    'template': 'im/projects/project_membership_enroll_notification.txt',
16
    }
17

  
13 18
SENDER = settings.SERVER_EMAIL
14 19
ADMINS = settings.ADMINS
15 20

  
......
25 30
    except NotificationError, e:
26 31
        logger.error(e.message)
27 32

  
33
def membership_enroll_notify(project, user):
34
    try:
35
        notification = build_notification(
36
            SENDER,
37
            [user.email],
38
            MEM_ENROLL_NOTIF['subject'] % project.__dict__,
39
            template= MEM_ENROLL_NOTIF['template'],
40
            dictionary={'object':project})
41
        notification.send()
42
    except NotificationError, e:
43
        logger.error(e.message)
44

  
28 45
def application_submit_notify(application):
29 46
    try:
30 47
        notification = build_notification(

Also available in: Unified diff