0

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?

1 Answer 1

1

You might try the Proxy helper: http://peewee.readthedocs.org/en/latest/peewee/playhouse.html#proxy

Sign up to request clarification or add additional context in comments.

1 Comment

It worked. I now realised that you are the developer. You may want to create something similar for Auth too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.