# Path: showoff/lib/exceptions.py
# class NoSuchPageError(Error):
#     pass


from showoff.lib.exceptions import NoSuchPageError
    :license: BSD, see LICENSE.txt for more details.
"""



class Paginator(object):
    """Paginate given list of items"""

    def __init__(self, album, items, per_page, page, endpoint, template):
        """Constructor

           Args:
             album (string): name of the album
             items (list): list of all items
             per_page (integer): amount of items to show per page
             page (integer): number of requested page
             endpoint (string): base url for constructing the return url
             template (string): template to use

           Raises:
             NoSuchPageError if page does not exist
        """
        self.album = album
        self.items = items
        self.per_page = per_page
        self.page = page
        self.endpoint = endpoint
        self.template = template

        if self.page > self.pages or self.page < 1:

# Path: showoff/lib/exceptions.py
# class NoSuchPageError(Error):
#     pass


# Path: showoff/lib/paginator.py
from showoff.lib.exceptions import NoSuchPageError

    :license: BSD, see LICENSE.txt for more details.
"""



class Paginator(object):
    """Paginate given list of items"""

    def __init__(self, album, items, per_page, page, endpoint, template):
        """Constructor

           Args:
             album (string): name of the album
             items (list): list of all items
             per_page (integer): amount of items to show per page
             page (integer): number of requested page
             endpoint (string): base url for constructing the return url
             template (string): template to use

           Raises:
             NoSuchPageError if page does not exist
        """
        self.album = album
        self.items = items
        self.per_page = per_page
        self.page = page
        self.endpoint = endpoint
        self.template = template

        if self.page > self.pages or self.page < 1:

            raise NoSuchPageError