Exemplo n.º 1
0
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
Exemplo n.º 2
0
def answer_render_markdown(sender, instance, *args, **kwargs):
    if instance.text is not None:
        instance.text_rendered = htmlize(instance.text)