Commits

offline committed 58ff65a

filmfeed html fixed

  • Participants
  • Parent commits 225d77a

Comments (0)

Files changed (3)

 .*\.pyc
+django_simplepagination.egg-info

File simplepagination/__init__.py

         """
 
         self.object_list_item_name = object_list_item_name
-        style = style or getattr(settings, "PAGINATION_STYLE", "digg")
-        self.backend = get_instance_from_path(settings.PAGINATION_BACKENDS[style])
+        self.style = style or getattr(settings, "PAGINATION_STYLE", "digg")
+        self.backend = get_instance_from_path(settings.PAGINATION_BACKENDS[self.style])
         self.per_page = per_page
         self.frame_size = frame_size
         self.allow_user_per_page = allow_user_per_page
         try:
             paginate_qs = output.pop(self.object_list_item_name)
         except KeyError:
-            raise KeyError("Variable with name '%s', not found in view returned dictionary" % self.object_list_item_name)
+            raise KeyError("Key '%s' not found in view's returned dictionary" % self.object_list_item_name)
         paginator = Paginator(paginate_qs, per_page)
         
         try:

File simplepagination/templates/paginator_filmfeed.html

 {% load paginator %}
 
-{% for i in page_numbers %}
-    {% ifequal i page_num %}
+{% for i in paginator.page_numbers %}
+    {% ifequal i paginator.page_num %}
         <span class="filmfeed_pages_disabled">{{ i }}</span>
     {% else %}
-        <a href='{% page_link i params anchor %}' class="filmfeed_pages">{{ i }}</a>
+        <a href='{% page_link i paginator.params paginator.anchor %}' class="filmfeed_pages">{{ i }}</a>
     {% endifequal %}
-{% endfor %}
+{% endfor %}