I have a bunch of posts stored in text files formatted in yaml/textile (from Jekyll) that I am trying to import into my new Django project. The problem is that Django is escaping the actual html code, meaning my post is not getting formatted. How can I got about fixing this? should I change something in the jekyll-import command (a custom manage.py command), the postgresql server, or the views.py file?
Example:
The one thing I can’t do is write about myself. Hell, look at my <a href="http://colegleason.github.com/about.htm开发者_开发知识库l">about me page.</a>
Well, I figured it out right after I posted it. I had tried this before but used the wrong syntax. To do this I just had to add '|safe' to the end of my body tag.
Like so:
{{ body|safe }}
Very nice.
精彩评论