Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
`django.contrib.markup` is deprecated in Django 1.5. Here is a simple replacement for the markdown filter.
import markdown as mkdn
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
def markdown(value):
return mark_safe(mkdn.markdown(value, safe_mode='escape'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.