Reputation: 2087
I want to use a factory method to create an app instance. To do this I need to init a Database inside that function. The problems is that I actually need the object before I create an app instance.
I tried this (https://github.com/coleifer/flask-peewee/issues/69) but it breaks my config file and I can't pass it to my models.
Any solution to this?
Upvotes: 0
Views: 202
Reputation: 26245
You might try the Proxy
helper: http://peewee.readthedocs.org/en/latest/peewee/playhouse.html#proxy
Upvotes: 1