I'm using Flask-Restless
0.17.0 and having trouble getting a preprocessor or postprocessor function to fire. For reference, I have an SQLAlchemy model that look like:
class Transaction(Base):
id = Column(Integer, primary_key=True)
name = Column(Unicode)
description = Column(Unicode)
I'm able to register the API endpoint without any trouble, but I can not get this hello_world
postprocessor to print "hello world" for the life of me:
def hello_world(**kwargs):
print 'hello world'
manager.create_api(
fraud.data.Transaction
methods=['GET', 'POST', 'DELETE'],
postprocessors={'POST_RESOURCE': [hello_world]},
)
Am I missing something? Any pointers, hints, etc would be greatly appreciated!