Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Search functionality doesn't seem to be implemented #6

@tahoe

Description

@tahoe

Hi, not to nit pick but I can't see how searching could possibly work here.
in the init method you define search_func as a lambda that takes two arguments and just returns the first.
I don't see an intuitive way to add a search function so is this a placeholder?

Also, I tried using this with Flask-restful and there is no request.GET method and the multidict that request.values returns isn't parsable in my testing.

I have modified the code so that it works with Flask-restful.
It requires the import

from querystring_parser import parser

and where you pass request.GET in your example I am passing the following

parser.parse(request.query_string)

To get this to work I removed the query_into_dict method and just passed in the vars like:

#columns = self.query_into_dict("columns")
#ordering = self.query_into_dict("order")
#search = self.query_into_dict("search")

columns = self.params["columns"]
ordering = self.params["order"]
search = self.params["search"]

still working out how to get searching working though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions