<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>David Cramer's Blog - Latest Comments in Pagination in Django</title><link>http://davidcramer.disqus.com/</link><description></description><atom:link href="https://davidcramer.disqus.com/thread_52/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 11 May 2010 01:05:37 -0000</lastBuildDate><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-49477472</link><description>&lt;p&gt;Thank you, I have been looking for search result paging for quite some time and this was really helpful in achieving that goal. I didn't quite understand all of what was going on but that has more to do with my level of understanding with django than your work here. I'll be checking back in to see if I get more of what's going on here&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nicktank</dc:creator><pubDate>Tue, 11 May 2010 01:05:37 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153936</link><description>&lt;p&gt;Luijk has it right.  I stopped reading when I saw the ridiculous amount of code you wrote as an example of django's built in pagination.  all you have to do call the object_list generic view at the end of your view, pass it the queryset and a handful of extra (optional) arguments.&lt;br&gt;At the template level, it can be a little bit redundant, still, but that can be handled with a simple inclusion tag.  Sometimes it seems like you save a lot of time by just rolling your own stuff like this instead of figuring out the django idioms, but in the end it pays off to spend a couple of days with the docs :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andre LeBlanc</dc:creator><pubDate>Sun, 19 Jul 2009 23:13:10 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153935</link><description>&lt;p&gt;Personally I like having less verbose template logic. I pass request into a custom Paginator subclass which adds another iteration method "pages". "pages" returns a tuple of (page_number, urlencoded_query) which you can just iterate over to display in your templates.&lt;/p&gt;&lt;p&gt;Secondly I've got a little shortcut function "get_pagination" that returns a tuple of (paginator, page_obj) for a given request and queryset.&lt;/p&gt;&lt;p&gt;Makes the view code less ug.&lt;/p&gt;&lt;p&gt;&lt;a href="http://gist.github.com/145950" rel="nofollow noopener" target="_blank" title="http://gist.github.com/145950"&gt;http://gist.github.com/145950&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Boxall</dc:creator><pubDate>Mon, 13 Jul 2009 01:29:17 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153933</link><description>&lt;p&gt;Another vote for django-pagination here.  Sensible and easy to use.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris Young</dc:creator><pubDate>Sun, 05 Jul 2009 21:51:46 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153931</link><description>&lt;p&gt;Yes, there is a useful tag to deal with pagination.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">???</dc:creator><pubDate>Sat, 04 Jul 2009 20:36:24 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153929</link><description>&lt;p&gt;What's wrong with wrapping a generic function?&lt;/p&gt;&lt;p&gt;&lt;a href="http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-list-detail-object-list" rel="nofollow noopener" target="_blank" title="http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-list-detail-object-list"&gt;http://docs.djangoproject.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Luijk</dc:creator><pubDate>Fri, 03 Jul 2009 07:12:31 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153926</link><description>&lt;p&gt;I would also recommend django-pagination. For most situations it's more than efficient.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Casseen</dc:creator><pubDate>Fri, 03 Jul 2009 06:32:13 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153925</link><description>&lt;p&gt;Additional to django-pagination you might also find django-reversetag (&lt;a href="http://github.com/ulope/django-reversetag/tree/master)" rel="nofollow noopener" target="_blank" title="http://github.com/ulope/django-reversetag/tree/master)"&gt;http://github.com/ulope/dja...&lt;/a&gt; to be helpful in creating reusable pagination templates.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">UloPe</dc:creator><pubDate>Fri, 03 Jul 2009 05:13:37 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153924</link><description>&lt;p&gt;I've been using django-pagination on a few projects and it works well for these sorts of situations.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">TrevorFSmith</dc:creator><pubDate>Thu, 02 Jul 2009 19:43:20 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153923</link><description>&lt;p&gt;django-pagination looks like a pretty nice project. Seems to be a less verbose approach to what we've done. I like it :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Thu, 02 Jul 2009 19:25:54 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153921</link><description>&lt;p&gt;Have you looked at django pagination?&lt;/p&gt;&lt;p&gt;&lt;a href="http://code.google.com/p/django-pagination/" rel="nofollow noopener" target="_blank" title="http://code.google.com/p/django-pagination/"&gt;http://code.google.com/p/dj...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Beetle B.</dc:creator><pubDate>Thu, 02 Jul 2009 18:27:45 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153920</link><description>&lt;p&gt;This is an extension to the pagination. I'm not sure what you're saying is "wrong", but I can assure you, this has been the most "sane" way we've come up with for pagination.&lt;/p&gt;&lt;p&gt;Here are your docs: &lt;a href="http://docs.djangoproject.com/en/dev/topics/pagination/" rel="nofollow noopener" target="_blank" title="http://docs.djangoproject.com/en/dev/topics/pagination/"&gt;http://docs.djangoproject.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Thu, 02 Jul 2009 17:47:26 -0000</pubDate></item><item><title>Re: Pagination in Django</title><link>http://cramer.io//466/pagination-in-django.html#comment-50153916</link><description>&lt;p&gt;I think you need to read up the django Pagination docs a couple more times, you got it all wrong.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gonsalu</dc:creator><pubDate>Thu, 02 Jul 2009 17:43:02 -0000</pubDate></item></channel></rss>