def accept(self, user):
        if not self.allows_accept(user):
            raise NominationAcceptNotAllowedException()
        self.accepted = True
        nomination_will_be_accepted.send(sender=self.__class__,
                                         nomination=self)
        self.save()
        nomination_was_accepted.send(sender=self.__class__,
                                     nomination=self)

        if notification:
            if self.badge.creator:
                notification.send([self.badge.creator], 'nomination_accepted',
                                  dict(nomination=self,
                                       protocol=DEFAULT_HTTP_PROTOCOL))
            if self.creator:
                notification.send([self.creator], 'nomination_accepted',
                                  dict(nomination=self,
                                       protocol=DEFAULT_HTTP_PROTOCOL))

        return self
Accept this nomination for the nominee.
dataset/ETHPy150Open mozilla/django-badger/badger/models.py/Nomination.accept