I have a Django project
but I need to convert a string in Django to HTML
I try BeautifulSoup but I fail. How can I convert it?
Here is the code of views.py and HTML
f= markdown2.markdown(util.get_entry(title))
return render(request, "encyclopedia/entry.html", {
"fileContent": f
})
HTML:
{% extends "encyclopedia/layout.html" %}
{% block title %}
Encyclopedia
{% endblock %}
{% block body %}
{{fileContent}}
{% endblock %}