First I created __init__.py
from flask import Flask
app = Flask(__name__)
Then in a separate file, in the same directory, run.py
from app import app
app.run(
debug = True
)
When I try to run run.py
, I get the error
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
ImportError: No module named app