I am creating a flask app and try to render index.html
. When I run the app, these errors occurs:
127.0.0.1 - - [09/Oct/2020 15:08:16] "GET /dim0/image1.png HTTP/1.1" 404 -
...
Here is the code app.py
:
...
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run()
The app structure:
+-- app.py
+-- static
| +-- dim0
| +-- image1.png
+-- templates
| +-- index.html
+-- Procfile
+-- runtime.txt
+-- requirements.txt