Example #1
0
    def notify_modifs(self):
        previous = Action.objects.filter(object=self).order_by("-datemodif")

        if previous:
            previous = previous[0]
            body = note_diff(previous, self)
        else:
            body = note_diff(self, self)
        self.notify(body=body)
Example #2
0
 def fill_context(self):
     previous = Action.objects.filter(
         object=self.note).order_by('-datemodif')[0]
     return note_diff(previous, self.note)