Skip to content

Commit

Permalink
chore: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
danjac committed Sep 11, 2024
1 parent 8bb25fa commit 2d48de5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion radiofeed/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ def paginate(


def paginate_lazy(*args, **kwargs) -> SimpleLazyObject:
"""Returns lazily-evaluated pagination object"""
"""Returns lazily-evaluated pagination object.
Use instead of `paginate()` in cases where the pagination is in a cached template snippet,
so the database queries are not evaluated until the page obj is referenced.
"""
return SimpleLazyObject(lambda: paginate(*args, **kwargs))

0 comments on commit 2d48de5

Please sign in to comment.