Source

django-easymarkdown / easymarkdown / widgets.py

Full commit
from django import forms
from django.contrib.admin.widgets import AdminTextareaWidget

__all__ = [
    'AdminMarkdownTextareaWidget',
    'MarkdownTextarea',
]

class MarkdownTextarea(forms.widgets.Textarea):
    def render(self, name, value, attrs=None):
        if value is not None and not isinstance(value, unicode):
            value = value.markdown
        return super(MarkdownTextarea, self).render(name, value, attrs)

class AdminMarkdownTextareaWidget(MarkdownTextarea, AdminTextareaWidget):
    pass