0

So I have an HTML template that should display text within the HTML, but of course, it doesn't. My HTML is like so:

<h2>okay {{Iputithere}}</h2>

The flask is like so:

If “success” in my other function:
    Return render_template(“index.html”, headline=iputithere) 

I’m on an iPhone. Now, when just plain returning the variable it works fine so I know it’s not a null value. Which is what I don’t understand. The variable I am trying to return is a string but I also hardcoded a string to make sure and it still wasn’t returning in the html. Is there any reasoning?

Note: my h2 tags are not displaying I can’t fix it.

RWAM
  • 6,760
  • 3
  • 32
  • 45
Noah
  • 154
  • 11

1 Answers1

1

You have to do this:

<h2 >okay {{headline}}</h2 >

You are passing the value in the headline variable from render_template so instead of Iputithere, you have to use headline

ParthS007
  • 2,581
  • 1
  • 22
  • 37