Flask
project, the project structure is as follows:
app/__init__.py
use from app.home import home as home_blueprint
to introduce home
;
home/__init__.py
is as follows:
from flask import Blueprint
home = Blueprint("home", __name__)
import app.home.views
and the code in app/home/views.py
is as follows:
from . import home
@home.route("/")
def index():
return "Home Page"
from at the beginning of . Is import home
from home/__init__.py
import
? While home/__init__.py
ends with import app.home.views
to import content from views.py
, won"t there be circular references?