-
Notifications
You must be signed in to change notification settings - Fork 301
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
The create_api method fails if flask-sqlalchemy has been initialized with init_app() #409
Comments
Version 0.17.0 confirmed here, downgraded to 0.16.0 and worked. |
I've got the same problem with 0.17.0, although I didn't try it with 0.16.0 |
Downgrade to 0.16 worked for me |
Same issue. Seems to work with fine if only using |
In 0.17 you can pass your app as a keyword argument to rest_manager = APIManager(flask_sqlalchemy_db=db)
rest_manager.create_api(SomeModel, methods=['GET', 'POST'], app=app) Edit: Nevermind, this isn't registering the endpoints for me. |
Same issue.
|
I added next line
before
and restless works. |
finally, I found what it happened! this is below with create_api is ok for me manager.create_api(Person, methods=['GET', 'POST', 'DELETE'], primary_key='id') I discover the source code of create_api_blueprint, add a primary_key will not check the db before |
Hi all, The |
Check if any route in your app |
Let's say I have two files:
server.py
model.py
When I do a
python server.py
it works as expected with Flask-Restless version0.16.0
, but fails with Flask-Restless version0.17.0
.The text was updated successfully, but these errors were encountered: