-1

I'm trying to render my report to the page however the html code is showing not the actual object, how do I display the object.

profile = pp.ProfileReport(df, check_correlation=False)

return render_template('profile.html', my_bucket=my_bucket, profile=profile.to_html())

enter image description here

Theo
  • 71
  • 8
  • 1
    Edit the `profile.html` template to make sure that it says `{{ profile | safe }}`. That should render the profile inside the template. – Abdou Jul 23 '18 at 11:51
  • 1
    Flask looks for HTML files in your ```templates``` folder on your machine. So when you call render_template it checks there for your file. You may want to try ```profile.to_file()``` and write a file which you then refer to in ```render_tempalate``` as a work around if you cannot get it to work properly. – lwileczek Jul 23 '18 at 11:53

1 Answers1

0

adding {{ profile | safe }} to my code fixed the issue as it now renders the profile inside the template thanks @abdou

Theo
  • 71
  • 8