Revision 71a38edf snf-astakos-app/astakos/im/models.py
b/snf-astakos-app/astakos/im/models.py | ||
---|---|---|
65 | 65 |
from astakos.im.settings import ( |
66 | 66 |
DEFAULT_USER_LEVEL, INVITATIONS_PER_LEVEL, |
67 | 67 |
AUTH_TOKEN_DURATION, BILLING_FIELDS, |
68 |
EMAILCHANGE_ACTIVATION_DAYS, LOGGING_LEVEL |
|
68 |
EMAILCHANGE_ACTIVATION_DAYS, LOGGING_LEVEL, |
|
69 |
GROUP_CREATION_SUBJECT |
|
69 | 70 |
) |
70 | 71 |
from astakos.im.endpoints.qh import ( |
71 | 72 |
register_users, send_quota, register_resources |
... | ... | |
1178 | 1179 |
|
1179 | 1180 |
@property |
1180 | 1181 |
def approved_members(self): |
1181 |
return self.members.filter(is_accepted=True)
|
|
1182 |
return [m.person for m in self.members.filter(is_accepted=True)]
|
|
1182 | 1183 |
|
1183 | 1184 |
def suspend(self): |
1184 | 1185 |
self.last_approval_date = None |
... | ... | |
1269 | 1270 |
application.save() |
1270 | 1271 |
notification = build_notification( |
1271 | 1272 |
settings.SERVER_EMAIL, |
1272 |
[settings.ADMINS], |
|
1273 |
_(GROUP_CREATION_SUBJECT) % {'group':app.definition.name}, |
|
1274 |
_('An new project application identified by %(serial)s has been submitted.') % app.serial
|
|
1273 |
[i[1] for i in settings.ADMINS],
|
|
1274 |
_(GROUP_CREATION_SUBJECT) % {'group':application.definition.name},
|
|
1275 |
_('An new project application identified by %(serial)s has been submitted.') % application.__dict__
|
|
1275 | 1276 |
) |
1276 | 1277 |
notification.send() |
1277 | 1278 |
return application |
Also available in: Unified diff