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.

0

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.