offline avatar offline committed b72e981

per_page reset logic added

Comments (0)

Files changed (3)

ninjapaginator/__init__.py

+from ninjapaginator.util import NinjaPaginator

ninjapaginator/util.py

     Pagination decorator with multiple types of pagination
     Should be used along with 'render_to' decorator
     from django-annoying application
-    http://www.assembla.com/spaces/django-annoying
+    http://bitbucket.org/offline/django-annoying/wiki/Home
     """
 
     def __init__(self, object_list='object_list', style='digg', per_page=10, frame_size=8):
         self.object_list = object_list
         self.style = style
         self.per_page = per_page
+        self.per_page_backup = per_page
         self.frame_size = frame_size
         
     def __call__(self, function):
         if "per_page" in params:
             self.per_page = int(params['per_page'])
         else:
+            # reset per_page variable to default
+            self.per_page = self.per_page_backup
             params['per_page'] = self.per_page
             
         extra_params = ""
 from setuptools import setup, find_packages
 setup(
     name = "django-ninjapaginator",
-    version = "0.1.3",
+    version = "0.1.4",
     packages = find_packages(),
     author = "Anderson",
     author_email = "self.anderson@gmail.com",
     description = "Django application with multiple type of pagination integrated",
     license = "BSD",
     keywords = "django",
-    url = "http://www.assembla.com/wiki/show/ninja-paginator",
+    url = "http://bitbucket.org/offline/django-ninjapaginator/wiki/",
     install_requires = ["django-annoying"],
     include_package_data = True,
     zip_safe = False
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.