<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: DiggPaginator update</title>
	<atom:link href="http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/</link>
	<description>Contributing back to the Google Index.</description>
	<lastBuildDate>Sat, 17 Dec 2011 12:11:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: C Moran</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-1351</link>
		<dc:creator>C Moran</dc:creator>
		<pubDate>Wed, 28 Jul 2010 05:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-1351</guid>
		<description>Re my previous comment:

Never mind, I got it, but it would be useful to post that info anyway. Thanks again.</description>
		<content:encoded><![CDATA[<p>Re my previous comment:</p>
<p>Never mind, I got it, but it would be useful to post that info anyway. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C Moran</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-1350</link>
		<dc:creator>C Moran</dc:creator>
		<pubDate>Wed, 28 Jul 2010 03:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-1350</guid>
		<description>Hi,

Could you please post here what the code within the template should look like? Just the basic flow of how to output the links, not the styling.

Thanks and cheers for a great snippet.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Could you please post here what the code within the template should look like? Just the basic flow of how to output the links, not the styling.</p>
<p>Thanks and cheers for a great snippet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-651</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 09 Oct 2009 12:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-651</guid>
		<description>Konstantin, wrt the the object_list generic view: Well, it seems possible, from a look at the code, if you just don&#039;t use the views own pagination features; looks like you&#039;d have to pass paginate_by=False and an empty queryset, and pass the DiggPaginator instance through extra_context. 

It&#039;s just that pagination is pretty much the only thing that view does, so I&#039;m not sure the above makes all that much sense. You&#039;d be better off just using your own view.

Thanks for the tip about the math operations. You&#039;re right, of course, I&#039;m slightly stupefied that I wrote the code the way I did. I&#039;m not going to update the snippet, but I will update my repository, which you can find here: http://bitbucket.org/miracle2k/djutils/src/tip/djutils/pagination.py</description>
		<content:encoded><![CDATA[<p>Konstantin, wrt the the object_list generic view: Well, it seems possible, from a look at the code, if you just don&#8217;t use the views own pagination features; looks like you&#8217;d have to pass paginate_by=False and an empty queryset, and pass the DiggPaginator instance through extra_context. </p>
<p>It&#8217;s just that pagination is pretty much the only thing that view does, so I&#8217;m not sure the above makes all that much sense. You&#8217;d be better off just using your own view.</p>
<p>Thanks for the tip about the math operations. You&#8217;re right, of course, I&#8217;m slightly stupefied that I wrote the code the way I did. I&#8217;m not going to update the snippet, but I will update my repository, which you can find here: <a href="http://bitbucket.org/miracle2k/djutils/src/tip/djutils/pagination.py" rel="nofollow">http://bitbucket.org/miracle2k/djutils/src/tip/djutils/pagination.py</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: konstantin</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-650</link>
		<dc:creator>konstantin</dc:creator>
		<pubDate>Fri, 09 Oct 2009 09:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-650</guid>
		<description>one more thing:

you can avoid floating point operations:

max_padding = int(math.ceil(self.body/2.0)-1)
is the same as
max_padding = (self.body + 1) / 2 - 1

in general: (K + N - 1) / N == math.ceil(float(K) / float(N)), where K and N are integers

and 

math.floor(number+body/2.0)
is the same as
number+body / 2</description>
		<content:encoded><![CDATA[<p>one more thing:</p>
<p>you can avoid floating point operations:</p>
<p>max_padding = int(math.ceil(self.body/2.0)-1)<br />
is the same as<br />
max_padding = (self.body + 1) / 2 &#8211; 1</p>
<p>in general: (K + N &#8211; 1) / N == math.ceil(float(K) / float(N)), where K and N are integers</p>
<p>and </p>
<p>math.floor(number+body/2.0)<br />
is the same as<br />
number+body / 2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: konstantin</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-649</link>
		<dc:creator>konstantin</dc:creator>
		<pubDate>Fri, 09 Oct 2009 09:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-649</guid>
		<description>hello,
thanks for sharing this code. i am trying to integrate your code in to my template used from django.views.generic.list_detail.object_list. have you used your paginator in a similar context?</description>
		<content:encoded><![CDATA[<p>hello,<br />
thanks for sharing this code. i am trying to integrate your code in to my template used from django.views.generic.list_detail.object_list. have you used your paginator in a similar context?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DiegoCerdan</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-584</link>
		<dc:creator>DiegoCerdan</dc:creator>
		<pubDate>Fri, 17 Apr 2009 02:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-584</guid>
		<description>I used your DiggPagination code on my site and it works like charm. Thank you very much.</description>
		<content:encoded><![CDATA[<p>I used your DiggPagination code on my site and it works like charm. Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giovanni</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-578</link>
		<dc:creator>Giovanni</dc:creator>
		<pubDate>Thu, 26 Feb 2009 08:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-578</guid>
		<description>hi, just want to say thanks: I use it and it&#039;s very useful</description>
		<content:encoded><![CDATA[<p>hi, just want to say thanks: I use it and it&#8217;s very useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernhard</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-89</link>
		<dc:creator>Bernhard</dc:creator>
		<pubDate>Fri, 20 Jun 2008 20:55:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-89</guid>
		<description>Sorry for the confusion...
Works as expected, very great! Thanks again!</description>
		<content:encoded><![CDATA[<p>Sorry for the confusion&#8230;<br />
Works as expected, very great! Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-88</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 20 Jun 2008 20:43:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-88</guid>
		<description>Bernhard, QuerySetDiggPaginator should work, it subclasses both DiggPaginator and Django&#039;s QuerySetPaginator. Give it a try, and please let me know if it doesn&#039;t work (or even if it does - you&#039;ve got me bit worried now ;)).</description>
		<content:encoded><![CDATA[<p>Bernhard, QuerySetDiggPaginator should work, it subclasses both DiggPaginator and Django&#8217;s QuerySetPaginator. Give it a try, and please let me know if it doesn&#8217;t work (or even if it does &#8211; you&#8217;ve got me bit worried now <img src='http://blog.elsdoerfer.name/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernhard</title>
		<link>http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/comment-page-1/#comment-87</link>
		<dc:creator>Bernhard</dc:creator>
		<pubDate>Fri, 20 Jun 2008 20:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/05/26/diggpaginator-update/#comment-87</guid>
		<description>Hi,
first of all thanks for this script!
Why is the QuerySetDiggPaginator empty? I need to paginate a QuerySet ;) If i use the class DiggPaginator it works, but there is no &quot;LIMIT OFFSET...&quot; on my Querys. This is a performance killer.

Thanks in advance,
io_error</description>
		<content:encoded><![CDATA[<p>Hi,<br />
first of all thanks for this script!<br />
Why is the QuerySetDiggPaginator empty? I need to paginate a QuerySet <img src='http://blog.elsdoerfer.name/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  If i use the class DiggPaginator it works, but there is no &#8220;LIMIT OFFSET&#8230;&#8221; on my Querys. This is a performance killer.</p>
<p>Thanks in advance,<br />
io_error</p>
]]></content:encoded>
	</item>
</channel>
</rss>

