template tag inside object TextField
问题 I need custom template tag inside model.TextField value. Value from the object text field have something like "lorem ipsum dolor {% mytag %}" but "mytag" is not rendered as template tag. It is registered in the library as tag and loaded on the page and I have {{ object.textfield|safe }} filter. Is it possible at all? 回答1: As Django's template engine can easily be used anywhere in your code you should be able to do something like this: from django.template import Context, Template rendered =