def delete_match(self, user, match): Notification.objects.create(sender=m2k(user), recipient=m2k(match), action=actions.DELETED_MATCH)
def create_user(self, user, new_user): Notification.objects.create(sender=m2k(user), recipient=m2k(new_user), action=actions.CREATED_RESPONSE)
def create_match(self, user, match): Notification.objects.create(sender=m2k(user), recipient=m2k(match), action=actions.MATCHED)
def edit_match(self, user, match): Notification.objects.create(sender=m2k(user), recipient=m2k(match), action=actions.EDITED_MATCH)
def delete_response(self, user, response): Notification.objects.create(sender=m2k(user), recipient=m2k(response), action=actions.DELETED_RESPONSE)
def edit_response(self, user, response): Notification.objects.create(sender=m2k(user), recipient=m2k(response), action=actions.EDITED_RESPONSE)
def delete_tutor(self, user, tutor): Notification.objects.create(sender=m2k(user), recipient=m2k(tutor), action=actions.DELETED_TUTOR)
def edit_tutor(self, user, tutor): Notification.objects.create(sender=m2k(user), recipient=m2k(tutor), action=actions.EDITED_TUTOR)
def register_tutor(self, ttor): Notification.objects.create(sender=m2k(ttor), action=actions.REGISTERED_TUTOR) if AppSetting.objects.get(name=app_settings.TUTOR_REG_EMAIL).value: send_mail(ttor.email_address, emails.TUTOR_REG_SUBJECT, emails.TUTOR_REG_BODY, True)