diff --git a/boards/abstracts/paginator.py b/boards/abstracts/paginator.py --- a/boards/abstracts/paginator.py +++ b/boards/abstracts/paginator.py @@ -70,3 +70,5 @@ class DividedPaginator(Paginator): for key in self.params.keys()]) return self.link + url_params + def supports_urls(self): + return self.link is not None and self.params is not None diff --git a/boards/templatetags/board.py b/boards/templatetags/board.py --- a/boards/templatetags/board.py +++ b/boards/templatetags/board.py @@ -45,4 +45,5 @@ def post_view(post, *args, **kwargs): @register.simple_tag(name='page_url') def page_url(paginator, page_number, *args, **kwargs): - return paginator.get_page_url(page_number) + if paginator.supports_urls(): + return paginator.get_page_url(page_number)