23 Jan'12
Markdown image handling in Django
It’s an interesting question: how to deal with images in django admin which claims to be hardly extensible.
The default package comes with markdown integration, which could be easily installed by obtaining python-markdown from your favorite package manager.
Next, we should attach images to the record. We’ll do that by embedding special model of entry-specific image. To do the markdown, we need to have images’ paths or reference them in some way. The spec says we can invoke reference by ![][ref_id] and then it’ll be substituted.
def get_markdown(self): # create instance of Markdown class (note capital "M …
Category: development, django, Python