New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIManager.init_app must not store reference to Flask object #313

Closed
jfinkels opened this Issue May 9, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@jfinkels
Owner

jfinkels commented May 9, 2014

Currently, Flask-Restless violates the init_app rule listed at the bottom of the following extension development section: http://flask.pocoo.org/docs/extensiondev/#the-extension-code

This is a critical issue!

@jfinkels jfinkels added the bug label May 9, 2014

jfinkels added a commit that referenced this issue Feb 2, 2015

Makes init_app() no longer store a Flask app
Before, the APIManager.init_app() method would store the Flask
application provided to it as `self.app`. This violates the rules for
approved Flask extensions, as it makes it impossible to initialize
multiple Flask applications in parallel.

This also fixes an issue with providing a session or Flask-SQLAlchemy
database object in the constructor of APIManager, and later initializing
the Flask application.

This fixes issues #313 and #389.
@jfinkels

This comment has been minimized.

Owner

jfinkels commented Feb 2, 2015

Merged a fix for this in pull request #392.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment