Exemplo n.º 1
0
    def notify(self):

        # Notify recipient
        un = UserNotifications(self.recipient)
        un.add_friend_request(self)

        # Send email
        notify_friend_request(self.sender, self.recipient)
Exemplo n.º 2
0
Arquivo: models.py Projeto: La0/coach
  def notify(self):

    # Notify recipient
    un = UserNotifications(self.recipient)
    un.add_friend_request(self)

    # Send email
    notify_friend_request(self.sender, self.recipient)
Exemplo n.º 3
0
    def accept(self):
        # Add friend to symmetric relation
        self.sender.friends.add(self.recipient)

        # Notify sender
        un = UserNotifications(self.sender)
        un.add_friend_request(self, accepted=True)

        # Send email
        notify_friend_request(self.sender, self.recipient, accepted=True)

        # Delete
        self.delete()
Exemplo n.º 4
0
Arquivo: models.py Projeto: La0/coach
  def accept(self):
    # Add friend to symmetric relation
    self.sender.friends.add(self.recipient)

    # Notify sender
    un = UserNotifications(self.sender)
    un.add_friend_request(self, accepted=True)

    # Send email
    notify_friend_request(self.sender, self.recipient, accepted=True)

    # Delete
    self.delete()