Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to format html written part that comes from a python back end?

I have the following Html tag.

<p align="center" id="question">FormatHere</p>

The world "FormatHere" is replace from a string that came from my back end. I saw that By formatting the string in the back end then the format is not mantained in the front end.

Someone know how I can format a string coming from the backend that will replace the world FormatHere?
With specific format I meant that for example I can go head when-ever I want

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

first you need to return your string from backend as same name you use in frontend.

example:

return template("index.html", context={"string": "FormatHere"})

then:

<p align="center" id="question">{{string}}</p>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading