Status

3 years ago
3 years ago

People

(Reporter: willkg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Kitsune has two classes named Paginator that do two different things. Further, Django has its own Paginator that one of the Kitsune Paginators extends with some helpful "don't do a .count() call" kind of thing.

It's terrible that they're all named Paginator and reading the resulting code is really hard because you don't know which Paginator is which.

This bug covers refactoring that code so it's less crazy.

One possibility is to rename Paginator in kitsune/sumo/utils.py to CountPaginator since that's its whole purpose in life. Then either build in the fancy bits from kitsune/sumo/helpers.py Paginator or name that one PaginatorBlock or something like that since it's template-specific. That fixes some naming and hopefully reduces the confusion. It'd be good to look at the code and figure out what we can jettison altogether. Do we use all those Paginators? Where? Why?
You need to log in before you can comment on or make changes to this bug.