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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment