-
Notifications
You must be signed in to change notification settings - Fork 54
Decorates the proxy rather than the bound instance method #15
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
Conversation
…ion. Adds decorator list testing
i = cls() | ||
view = getattr(i, name) | ||
|
||
# Since the view is a bound instance method, first make it an actual function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoatle Let me know what you think. I think this is a better solution than moving the decorators to the bottom. It will allow the decorator list to be applied to all memebers (get, put, index, etc) then the proxy is generated. Wrapping the view as a function also allows for decorators to apply attributes.
@hoatle Some of the quantified issues should be ignored. It's forcing member functions to reference self or to have @staticmethod however, if you use staticmethod, FlaskView breaks. |
@incognick yes, let's ignore the qualified issues, I'm going to look into this PR. |
Great thanks! I fixed as many as possible. On Tue, May 17, 2016 at 5:59 PM Hoat Le notifications@github.com wrote:
|
view = make_func(view) | ||
|
||
# Now apply the class decorator list in reverse order | ||
# to match memeber decorator order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want this as a member function or move it outside of the class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant it's a typo, your PR looks good to me so I've merged with some minor updates. Thank you very much, I'm going to release v0.11.0 for this PR. Great work, @incognick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoatle great! Thanks for reviving this project and managing it 👍
@incognick v0.11.0 released, let's rock https://pypi.python.org/pypi/Flask-Classful :) |
All tests pass
issue #14