Esempio n. 1
0
    def save(self, *args, **kwargs):
        res = super().save(*args, **kwargs)

        create_comment_signal.send(sender=self.__class__,
                                   content_object=res,
                                   comment=self.cleaned_data['comment'],
                                   timestamp=None)

        return res
Esempio n. 2
0
    def save(self, *args, **kwargs):
        res = super().save(*args, **kwargs)

        create_comment_signal.send(sender=self.__class__,
                                   content_object=res,
                                   comment=self.cleaned_data['comment'],
                                   timestamp=None)

        return res
Esempio n. 3
0
    def save(self, *args, **kwargs):
        res = super().save(*args, **kwargs)

        comment = self.cleaned_data.get("comment")
        if comment:
            create_comment_signal.send(
                sender=self.__class__,
                content_object=res,
                comment=comment,
                timestamp=None,
            )

        return res