Mohammad Ali Daberi
Mohammad Ali Daberi

Reputation: 11

How can I render a {{}} variable in CKEditor in a Django template?

The variables that I put in Django-ckeditor are not displayed correctly. Is there a way to do it? enter image description here

I used autoescape and safe .

{% autoescape off %}
{{ msg }}
{% endautoescape %}

{{ message |safe }}

Upvotes: 0

Views: 51

Answers (1)

Mohammad Ali Daberi
Mohammad Ali Daberi

Reputation: 11

You can use :

template_email_content.subject = Acknowledgment of Your Application for '%s' Position

template_email_content.msg = Thank you for your interest in the [ {} ] position at company. We are writing to confirm that we have received your application.

subject = template_email_content.subject % position
msg = template_email_content.msg.format(position)

Upvotes: 1

Related Questions