示例#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
示例#2
0
文件: forms.py 项目: paulkahura/amy
    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
示例#3
0
文件: forms.py 项目: gaybro8777/amy
    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