[Flask] Registering Flask-SQLAlchemy models from an extension

Gergely Polonkai gergely at polonkai.eu
Sun Feb 11 14:27:17 EST 2018


I want to create an extension that, among other things, defines ORM models.
Being an extension, this means it is not me who defines the
flask_sqlalchemy.SQLAlchemy object, so I canʼt write my model classes like

class MyModel(db.Model):

Is there a recipe for this scenario?

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20180211/c221f67d/attachment.html>

More information about the Flask mailing list