def question_render_markdown(sender, instance, *args, **kwargs): if instance.details == "": instance.details = None if instance.details is not None: instance.details_rendered = htmlize(instance.details) else: instance.details_rendered = None
def answer_render_markdown(sender, instance, *args, **kwargs): if instance.text is not None: instance.text_rendered = htmlize(instance.text)