diff --git a/onto/view/rest_api.py b/onto/view/rest_api.py index d109ede..13035b8 100644 --- a/onto/view/rest_api.py +++ b/onto/view/rest_api.py @@ -13,6 +13,8 @@ class ParamsParams(Serializable): page_size = attrs.int current = attrs.int + def append_conditions(self, q): + return q class Sort(Serializable): foo = attrs.string @@ -457,12 +459,13 @@ def get(self): params_d = json.loads(params_str) sort_d = json.loads(sort_str) filter_d = json.loads(filter_str) - params = Params.from_dict({ + params_cls = getattr( _self.view_model_cls, 'params', Params ) + params = params_cls.from_dict({ 'params': params_d, 'sort': sort_d, 'filter': filter_d, }) - result = list(_self.view_model_cls.get_many()) + result = list(_self.view_model_cls.get_many(params=params)) paginated = _self.paginated_query_cls.new( data=result, total=0, diff --git a/setup.py b/setup.py index 6951806..5491530 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="onto", # Beta release - version="0.0.5a2", + version="0.0.5a3", author="Bill Rao", author_email="billrao@me.com", description="Build reactive back end with ease ",