Django - markup parser in template or view?
Posted
by Amit Ron
on Stack Overflow
See other posts from Stack Overflow
or by Amit Ron
Published on 2010-05-22T12:56:20Z
Indexed on
2010/05/22
13:00 UTC
Read the original article
Hit count: 385
I am building a website where my pages are written in MediaWiki Markup, for which I have a working parser function in Python.
Where exactly do I parse my markup: in the view's code, or in the template? My first guess would be something like:
return render_to_response( 'blog/post.html', {'post': post,
'content': parseMyMarkup(post.content) })
Is this the usual convention, or should I do something different?
© Stack Overflow or respective owner