-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Methods of classes cannot be used as blueprint routes #1943
Comments
What is the motivation for this style api? Blueprints work really well in modules. |
I want to pass in some objects, and as we are in the middle of a refactor, I don't want it to be tied to any specific import - I want the database to be injected through the class constructor, rather than an import. |
Hi @penn5
I've tested this, and it works exactly as expected. (And actually I will keep this in mind to implement in one of my applications in the future.) |
Describe the bug
Unable to define routes in classes
Code snippet
Expected behavior
Accessing /route says hi
Actual behavior
Including the blueprint fails with because trying to assign
__blueprintname__
on a method, but methods cannot have arbitrary attributes assigned.Environment (please complete the following information):
19.12.2, and master
Additional context
Introduced in #1445
The text was updated successfully, but these errors were encountered: