def process_inline_attachments(self, src): if self.attachments: pip = AttachmentInline(self.attachments) processor.register('attachment', pip) pis = SlideshowInline(self.attachments) processor.register('slideshow', pis) return processor.process(src)
def process_inline(self, field, src): if field not in self.inline_fields: return src if self.attachments: pip = AttachmentInline(self.attachments) processor.register('attachment', pip) pis = SlideshowInline(self.attachments) processor.register('slideshow', pis) return processor.process(src)