offline avatar offline committed b72e981

per_page reset logic added

Comments (0)

Files changed (3)


+from ninjapaginator.util import NinjaPaginator


     Pagination decorator with multiple types of pagination
     Should be used along with 'render_to' decorator
     from django-annoying application
     def __init__(self, object_list='object_list', style='digg', per_page=10, frame_size=8):
         self.object_list = object_list = 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'])
+            # 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
     name = "django-ninjapaginator",
-    version = "0.1.3",
+    version = "0.1.4",
     packages = find_packages(),
     author = "Anderson",
     author_email = "",
     description = "Django application with multiple type of pagination integrated",
     license = "BSD",
     keywords = "django",
-    url = "",
+    url = "",
     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
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.