Closed philof closed 7 years ago
I can't do this because if you set decorators in the end class this decorator list in the base resource will be overridden so check_headers will never be performed. I will make a fix for this today with metaclass to construct the class dynamically instead of using the constructor the instance.
That use case is already tested in the unit tests. Test_wrong_accept_headers hits PersonList which has custom get and post decorators.
New release is available on pypi with bug fix of this issue
Thank you very much for your contribution
Using a class decoration in Flask assigns the decorator at instantiation rather than each request, which @kypsibir pointed out.
Every request is now stable.