flask-accept icon indicating copy to clipboard operation
flask-accept copied to clipboard

Unable to decorate routes within a Flask_RESTful Resource class

Open TheMourningDawn opened this issue 6 years ago • 0 comments

.../env/lib/python3.5/site-packages/flask_accept/__init__.py", line 39, in __call__
    return self.accept_handlers[mimetype](*args, **kwargs)
TypeError: get() missing 1 required positional argument: 'self'

A much better description of the actual issue can be found in this Stack Overflow article

In short, since we are decorating an instance method, we to set the decorating class up as a descriptor class such that it knows about the instance of the class the function is bound to.

TheMourningDawn avatar Mar 14 '18 23:03 TheMourningDawn