class TextileWidget(forms.Textarea): """ A Textarea widget which appends basic Textile formating instructions: http://www.textism.com/tools/textile/ """ def render(self, name, value, attrs=None): self.attrs = {'cols': '85', 'rows': '10'} rendered = super(TextileWidget, self).render(name, value, attrs) html = u'

*bold* → bold \
_italic_ → italic
#numeric list \ → <ol>ordinal position</ol>
*bullet list → \ <ul>ordinal position</ul>
"linktext":url → \ creates link
[ view full textile \ reference ]

' return rendered + mark_safe(html)