I'd like to divide routes into multiple modules, but I don't want to use blueprints as answered in this question. The docs imply I can just import my views files in __init__.py
, but I can’t seem to get more than one to work. Should more than one be able to work?
This is a pared-down version of my __init__.py
:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
#
# App Configuration
#
gApp = Flask(__name__)
gApp.config.from_object(__name__)
gApp.config.update(dict(
DEBUG = True,
...
))
#
# Import the views. I don't know why I can't do more than one
#
import tsint.app
import tsint.admin