Ejemplo n.º 1
0
    def _additional_save_operations(self, amendmentproposal):
        ## create diff
        content = FullDocument.cleanText(self.cleaned_data["content"])
        newdiff = Diff.generateDiff(self.document.content, content)
        newdiff.fulldocument = self.document
        newdiff.save()

        ## add diff to amendmentproposal
        amendmentproposal.diff = newdiff
        return amendmentproposal
Ejemplo n.º 2
0
    def _additional_save_operations(self, amendmentproposal):
        ## create diff
        content = FullDocument.cleanText(self.cleaned_data["content"])
        newdiff = Diff.generateDiff(self.document.content, content)
        newdiff.fulldocument = self.document
        newdiff.save()

        ## add diff to amendmentproposal
        amendmentproposal.diff = newdiff
        return amendmentproposal
Ejemplo n.º 3
0
 def clean_content(self):
     content = self.cleaned_data["content"]
     content = sanitizehtml.sanitizeHtml(content)
     content = FullDocument.cleanText(content)
     return content
Ejemplo n.º 4
0
 def clean_content(self):
     content = self.cleaned_data["content"]
     content = sanitizehtml.sanitizeHtml(content)
     content = FullDocument.cleanText(content)
     return content