Closed SoxfnLj closed 8 months ago
While in the main.py after completing the import the code needs to be changed from:
app = create_app =====> app = create_app()
The "()" is missing and it is necessary in order to properly call the function that creates the app
OMG this works thank you so much!!
Im on the first step in this tutorial, and when I try to run the code, this error message appears, Traceback (most recent call last): File "c:\Users\LJH20\VSCode\Flask Web App\main.py", line 6, in
app.run(debug=True)
This is the code btw: main.py: from website import create_app
app = create_app
if name == 'main': app.run(debug=True) init.py: from flask import Flask
def create_app(): app = Flask(name) app.config['SECRET_KEY'] = 'This is my Secret Key'