Moved FeedMultiViewMixin to models.py and renamed to FeedView. Improved feed type...
[philo.git] / contrib / penfield / utils.py
diff --git a/contrib/penfield/utils.py b/contrib/penfield/utils.py
deleted file mode 100644 (file)
index 5df800c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-from django.core.paginator import Paginator, InvalidPage, EmptyPage
-
-
-def paginate(request, entries, entries_per_page):
-       paginator = Paginator(entries, entries_per_page)
-       try:
-               page_number = int(request.GET.get('page', '1'))
-               entries = paginator.page(page_number).object_list
-               page = paginator.page(page_number)
-       except ValueError:
-               page_number = 1
-               entries = paginator.page(page_number).object_list
-               page = paginator.page(page_number)
-       try:
-               entries = paginator.page(page_number).object_list
-               page = paginator.page(page_number)
-       except (EmptyPage, InvalidPage):
-               entries = paginator.page(paginator.num_pages).object_list
-               page = paginator.page(page_number)
-       return page
\ No newline at end of file