Skip to content
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

Plugin fails with decorated views ... #9

Open
oz123 opened this issue May 11, 2018 · 2 comments
Open

Plugin fails with decorated views ... #9

oz123 opened this issue May 11, 2018 · 2 comments

Comments

@oz123
Copy link

oz123 commented May 11, 2018

See discussion and solution to the bug in here:

https://github.com/oz123/demo-bottle-sqlite-bug

Don't let the sqlite in URL mislead you. Although, I first found this issue in SQLite plugin, the underlying
reason is a wrong check for the keyword mongodb which is the same both plugins.

@jhoonb
Copy link

jhoonb commented Jul 8, 2020

plugin abandoned?

@oz123
Copy link
Author

oz123 commented Jul 12, 2020

@jhoonb it seems like all the plugins in bottle are abandoned. Unfortunately. But the fix is easy :-)
check my plugin for peewee
https://github.com/oz123/bottle-peewee/blob/master/bottle_peewee.py
Also, the readme in the demo link has the solution:


The solution is to replace the check from:

argspec = inspect.getargspec(_callback)

To

params = inspect.signature(_callback).parameters

if keyword not in params:
    return callback


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants