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

ClassView must support init_app with blueprints, and with multiple apps #180

Open
jace opened this issue Mar 6, 2018 · 3 comments
Open

Comments

@jace
Copy link
Member

jace commented Mar 6, 2018

ClassView currently expects an app in the init_app call. It must also accept blueprints, and most support registration with more than one app.

The main (known) consideration when using a blueprint is that endpoint names must be prefixed with the blueprint's name. This applies to the ViewDecorator.endpoints set.

For multi-app support, endpoints must be saved against each app, making ViewDecorator.endpoints a dict of lists (not sets, see below), mapping the app to endpoints.

The ViewDecorator.endpoint attribute must change to a property that returns an appropriate endpoint for the current app. At the moment this will be the first endpoint in the list of endpoints registered for the current app, since we do not have a problem statement for selecting a specific endpoint.

@jace
Copy link
Member Author

jace commented Nov 22, 2018

Blueprint support was added in b3d08ad.

@jace
Copy link
Member Author

jace commented Nov 28, 2018

For multi-app support, endpoints must be saved against each app, making ViewDecorator.endpoints a dict of lists (not sets, see below), mapping the app to endpoints.

Endpoints are the same regardless of app, since they're defined inside the class, and the entire class is linked to the app.

Instead, ViewHandler.init_app (it's no longer called ViewDecorator) performs initialisation that does not need to repeat for additional apps. This should be gated.

@jace
Copy link
Member Author

jace commented Nov 28, 2018

ClassView.init_app has a similar requirement. It needs to be split up.

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

No branches or pull requests

1 participant