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

APIStack: Reusing same Bottle instance #2

Open
morille opened this issue Sep 19, 2020 · 0 comments
Open

APIStack: Reusing same Bottle instance #2

morille opened this issue Sep 19, 2020 · 0 comments

Comments

@morille
Copy link

morille commented Sep 19, 2020

Trying to add extra filter to the bottle router:

app = udon.wsgi.APIStack(prefix="/api")
app.app.router.add_filter("uuid", uuid_filter)
app.install_module("my_module")

But the bottle instance is overridden at each call to app.install_module so cannot use the new uuid filter in my_module.

Is there a reason for creating a new instance of bottle here:

app = stack.app_factory()

Instead of doing:

app = stack.app

Or is there a better way for customizing the APIStack router ?

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

1 participant