[Answer]-Force Django template to render curly brace values?

1👍

You have to create a custom template tag:

from django import template

register = template.Library()

@register.simple_tag(takes_context=True)
def render(context, tpl_string):
    t = template.Template(tpl_string)
    return t.render(context)

And the in your template:

{% load my_tags %}

{% render item.link %}

Leave a comment