I have this python flask bootstrap function:
# Index page (main page)
@app.route('/')
def index():
return render_template('test.html')
And my run code:
if __name__ == '__main__':
app.run(debug=True)
Of course the default folder will be under the (relative) templates directory so I have there:
templates/test.html templates/images/logo.svg
The source of test.html is:
<!DOCTYPE html>
<html lang="en">
<body>
Hello
<img src="/images/logo.svg">
<img src="images/logo.svg">
</body>
</html>
But when I load the page with the flask supplied link to the app, both images are broken.
I'm guessing my path to my logo.svg is wrong. How do I figure out where it is relative to the app's root?