flask-social icon indicating copy to clipboard operation
flask-social copied to clipboard

Flask factory pattern support

Open KeNaCo opened this issue 9 years ago • 2 comments

Lib don't allow to use factory pattern.

KeNaCo avatar Jan 23 '16 22:01 KeNaCo

Well, dirty hack for that is:

social._state = social.init_app(app, WhateverDatastoreYouImagine(...))

Oh, and, btw, it's properly fixed in #70

Informatic avatar Jan 24 '16 09:01 Informatic

Already working on it. I'm not fun of dirty hacks.. and #70 is way away from proper fix.. self._state is nice shortcut to object if you still have instance, but proper way is using app context.

KeNaCo avatar Jan 24 '16 10:01 KeNaCo