diff --git a/advlabdb/__init__.py b/advlabdb/__init__.py index c8a52a3..37e3bff 100644 --- a/advlabdb/__init__.py +++ b/advlabdb/__init__.py @@ -39,4 +39,9 @@ from advlabdb import models user_datastore = SQLAlchemyUserDatastore(db, models.User, models.Role) Security(app, user_datastore) -from advlabdb import routes, modelViews +try: + from advlabdb import routes, modelViews +except Exception as ex: + print( + "\nYou are probably initializing the database with a script. If not, then you have to worry about not being able to import in __init__.py!\n" + )