Friday, June 28, 2013

Using django tags in a blog post

I have a simple model that has a TextField used to store a blog post.

body = models.TextField()

I would like to be able to use django tags in the blog post, such as {% url '' %} and {% trans "" %}.

I tried using the |safe filter and passing a mark_safe() value but they don't convert the django tags to html.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment