Closed bilguun closed 7 years ago
I have a question about sorting. I tried to use preprocessors as mentioned in the documentation but no luck.
def fetch_preprocessor(filters=None, sort=None, group_by=None, single=None, **kw): .... preprocessors = { 'GET_MANY': [fetch_preprocessor] } manager.create_api(Host, results_per_page=10, methods=['GET', 'POST', 'PUT', 'DELETE'], preprocessors=preprocessors)
and called GET http://127.0.0.1:5000/api/host?sort=name but I can't access the field name atleast.
But I'm unable to access the sort argument from the request.
I'd appreciate a lot if you could help me out with this issue.
I have a question about sorting. I tried to use preprocessors as mentioned in the documentation but no luck.
and called GET http://127.0.0.1:5000/api/host?sort=name but I can't access the field name atleast.
But I'm unable to access the sort argument from the request.
I'd appreciate a lot if you could help me out with this issue.