Forums

webpage shows html code instead of text &images

I have a py4web app that has some pages that randomly select a template. The template is nested in the templates folder. So the link appears as:https://www.my_app.com/myapp/policies/template?template_name=scroll_over....where 'scroll_over' is the html template.What can I do to correct this.

Could you provide more details? How your web app code is rendering the templates for given views, for example?

Sorry, I had missed two things on upload tp PA: import jinja2 and this line: response.headers['Content-Type'] = 'text/html' return rendered_html Now it works well!

Glad you got it working