codebase-berkeley / application-portal

https://pure-cliffs-74204.herokuapp.com/portal/
4 stars 1 forks source link

Paginated applications endpoint #43

Open andrewkchan opened 6 years ago

andrewkchan commented 6 years ago

See (https://github.com/codebase-berkeley/ApplicationPortal/wiki/API-Endpoints):

andrewkchan commented 6 years ago

You may find https://docs.djangoproject.com/en/2.0/topics/pagination/ helpful

OldGuo commented 6 years ago

@theandrewchan @bdeleonardis1 take a look at https://github.com/codebase-berkeley/ApplicationPortal/commit/0487f02db56a41a7fe4993070985a35a562d5b8f and let me know if i'm missing anything

andrewkchan commented 6 years ago

For text search queries, the only thing is that I want the string matching to be more robust than just ignoring case, it should catch slight mispellings and such too. This might be non-trivial and require implementing something like elasticsearch etc.

OldGuo commented 6 years ago

Something like https://github.com/codebase-berkeley/ApplicationPortal/pull/50?

andrewkchan commented 6 years ago

The only thing left to do for this is test it!

andrewkchan commented 6 years ago

Hey @OldGuo , I'm getting a 500 error with line 47, something about lists not having a filter attribute. I think it might have something to do with the list comprehension you added for the fuzzy string matching?

OldGuo commented 6 years ago

My bad. I didn't update the category filter after changing things around for fuzzy matching. Pushed up a fix https://github.com/codebase-berkeley/ApplicationPortal/commit/18c24404308219ac7ef75aa8adb25ed72de50def