From 909fd5f9232899d5ca9d7f65868fcdd094717c9e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 8 Dec 2013 22:09:40 -0800 Subject: [PATCH] gallery.py: Pass page data through .index() Otherwise http://localhost:4000/?pp=2 will still get you the first page. --- posts/gallery/gallery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posts/gallery/gallery.py b/posts/gallery/gallery.py index 7b0d3d1..a7ec944 100755 --- a/posts/gallery/gallery.py +++ b/posts/gallery/gallery.py @@ -254,7 +254,7 @@ class CGIGalleryServer (object): try: try: if url is None: - self.index(stream=stream) + self.index(stream=stream, page=page) elif url.endswith('random'): self.random( url=url, stream=stream, max_width=500, max_height=500) @@ -349,9 +349,9 @@ class CGIGalleryServer (object): if is_image(picture_path): yield picture_path - def index(self, stream=None): + def index(self, page=0, stream=None): LOG.debug('index page') - return self._directory(self._base_path, stream=stream) + return self._directory(path=self._base_path, page=page, stream=stream) def _original_url(self, url): """Reverse thumbnail URL mapping -- 2.26.2