degal.py
changeset 6 d9d1f8e5f384
parent 5 156cdfffef8e
child 7 235ae238f694
--- a/degal.py	Thu Nov 08 19:09:05 2007 +0000
+++ b/degal.py	Thu Nov 08 19:26:00 2007 +0000
@@ -449,9 +449,10 @@
                         pagination += '<li><span>Next &raquo;</span></li>'
 
                     pagination += "</ul>"
+                    shorturl = "%s/%s" % (self.shorturl_code, cur_page+1)
                 else :
                     pagination = ''
-
+                    shorturl = self.shorturl_code
 
                 # render to index.html
                 gallery_tpl.renderTo(self.pathFor(self._page_fname(cur_page)), 
@@ -462,8 +463,8 @@
                     PAGINATION=pagination,
                     CONTENT="".join([i.thumbImgTag() for i in page]),
                     DESCR=self.descr,
-                    SHORTURL=self.inRoot('s', self.shorturl_code),
-                    SHORTURL_CODE=self.shorturl_code,
+                    SHORTURL=self.inRoot('s', shorturl),
+                    SHORTURL_CODE=shorturl,
                 )
         
         # render images