<?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: Yet another paginator (digg style)</title>
	<atom:link href="http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/</link>
	<description>Contributing back to the Google Index.</description>
	<lastBuildDate>Wed, 11 Aug 2010 13:02:07 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tagz &#124; &#34;Yet another paginator (digg style) &#124; the blog&#34; &#124; Comments</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-589</link>
		<dc:creator>Tagz &#124; &#34;Yet another paginator (digg style) &#124; the blog&#34; &#124; Comments</dc:creator>
		<pubDate>Sat, 16 May 2009 17:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-589</guid>
		<description>[...]               [upmod] [downmod]     Yet another paginator (digg style) &#124; the blog  (blog.elsdoerfer.name)    0 points posted 10 months, 1 week ago by jeethu  tags python webdev [...]</description>
		<content:encoded><![CDATA[<p>[...]               [upmod] [downmod]     Yet another paginator (digg style) | the blog  (blog.elsdoerfer.name)    0 points posted 10 months, 1 week ago by jeethu  tags python webdev [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DiggPaginator update &#124; the blog</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-72</link>
		<dc:creator>DiggPaginator update &#124; the blog</dc:creator>
		<pubDate>Mon, 26 May 2008 11:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-72</guid>
		<description>[...] an update (link goes to DjangoSnippets) to the paginator code I posted a while back (link goes to the old version). The main thing is the deprecation warning, which is now [...]</description>
		<content:encoded><![CDATA[<p>[...] an update (link goes to DjangoSnippets) to the paginator code I posted a while back (link goes to the old version). The main thing is the deprecation warning, which is now [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-71</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 20 May 2008 23:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-71</guid>
		<description>I&#039;ll do that once I update my Django SVN checkout, which should happen some time in the near future.</description>
		<content:encoded><![CDATA[<p>I'll do that once I update my Django SVN checkout, which should happen some time in the near future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dunedan</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-70</link>
		<dc:creator>Dunedan</dc:creator>
		<pubDate>Mon, 19 May 2008 18:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-70</guid>
		<description>Really great snippet!
But Django throws warning when using the paginator. Django says: &quot;The ObjectPaginator is deprecated. Use django.core.paginator.Paginator instead.&quot;.
Would be nice if you could port your code to the django.core.paginator.Paginator, because else it presumeable won&#039;t work in future.</description>
		<content:encoded><![CDATA[<p>Really great snippet!<br />
But Django throws warning when using the paginator. Django says: "The ObjectPaginator is deprecated. Use django.core.paginator.Paginator instead.".<br />
Would be nice if you could port your code to the django.core.paginator.Paginator, because else it presumeable won't work in future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-66</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 29 Apr 2008 18:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-66</guid>
		<description>Then you&#039;ll probably want to write a custom object_detail view, e.g. not wrap the built-in one. The issue is that in order to paginate the menu items you need to know the requested menu, but if you wrap object_detail, you pass it the slug/id, and it returns a http response. Your own code will never even get access the the actual menu object.

I suggest to leave the custom paginator out of it when asking questions - it doesn&#039;t appear to be related to the actual issue itself. Maybe you should first try to make it work with the standard paginator - you can always switch them out later on.

Don&#039;t forget the mailing list either - you&#039;re often going to be more successful there then on IRC.</description>
		<content:encoded><![CDATA[<p>Then you'll probably want to write a custom object_detail view, e.g. not wrap the built-in one. The issue is that in order to paginate the menu items you need to know the requested menu, but if you wrap object_detail, you pass it the slug/id, and it returns a http response. Your own code will never even get access the the actual menu object.</p>
<p>I suggest to leave the custom paginator out of it when asking questions - it doesn't appear to be related to the actual issue itself. Maybe you should first try to make it work with the standard paginator - you can always switch them out later on.</p>
<p>Don't forget the mailing list either - you're often going to be more successful there then on IRC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-63</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Tue, 29 Apr 2008 07:34:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-63</guid>
		<description>I tried the IRC channel, and so far most people weren&#039;t able to help me because they didn&#039;t understand the custom paginator.  Your correct in that it will show the object detail, but that has a relationship with another model.  Menu and MenuItem.  Menu is the object in question, I have my generic list view which lists all menu&#039;s available, and then the detail view will show a singular Menu which has many MenuItem&#039;s, which is where I need the paginator.

I&#039;ll try the IRC channel again but thanks again for the help anyway.</description>
		<content:encoded><![CDATA[<p>I tried the IRC channel, and so far most people weren't able to help me because they didn't understand the custom paginator.  Your correct in that it will show the object detail, but that has a relationship with another model.  Menu and MenuItem.  Menu is the object in question, I have my generic list view which lists all menu's available, and then the detail view will show a singular Menu which has many MenuItem's, which is where I need the paginator.</p>
<p>I'll try the IRC channel again but thanks again for the help anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-61</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 28 Apr 2008 13:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-61</guid>
		<description>I&#039;m not entirely sure what you want to accomplish, but I am also not very familiar with generic views. It seems you want to recreate the functionality of the &quot;object_detail&quot; view with a paginator added, which I am not sure how that would work anyway, since object_detail shows exactly ONE object, whereas the paginator is intended for a list of objects, of course. But in general, you can either try to copy the generic view code and modify it according to your needs, or call the generic view at the end of your own custom view, and return the generic views&#039; result.

In any case, this is pretty much unrelated to the paginator, so I would suggest you take this to django-users or the IRC channel.

One note: All the &quot;request.GET.has_key&quot; stuff seems highly unnecessary. The following should suffice:

&lt;pre name=&quot;code&quot; class=&quot;python&quot;&gt;paginator = DiggPaginator(menu_list, 6, page=request.GET.get(&#039;page&#039;, 1))&lt;/pre&gt;

This will create a paginator object with the current page set to whatever is in the &quot;page&quot; parameter, and it&#039;ll default to the first page if the parameter is missing.</description>
		<content:encoded><![CDATA[<p>I'm not entirely sure what you want to accomplish, but I am also not very familiar with generic views. It seems you want to recreate the functionality of the "object_detail" view with a paginator added, which I am not sure how that would work anyway, since object_detail shows exactly ONE object, whereas the paginator is intended for a list of objects, of course. But in general, you can either try to copy the generic view code and modify it according to your needs, or call the generic view at the end of your own custom view, and return the generic views' result.</p>
<p>In any case, this is pretty much unrelated to the paginator, so I would suggest you take this to django-users or the IRC channel.</p>
<p>One note: All the "request.GET.has_key" stuff seems highly unnecessary. The following should suffice:</p>
<pre name="code" class="python">paginator = DiggPaginator(menu_list, 6, page=request.GET.get('page', 1))</pre>
<p>This will create a paginator object with the current page set to whatever is in the "page" parameter, and it'll default to the first page if the parameter is missing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-60</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Sun, 27 Apr 2008 23:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-60</guid>
		<description>Yes I&#039;m back again...

I&#039;ve been trying to write a custom view to incorporate your pagination code in whilst using a wrapper to use the generic view slug handling.

This is my views.py: http://dpaste.com/hold/47175/

I&#039;ve looked at many examples of how to create a wrapper, I just have no idea of how I could combine your custom pagination with a wrapper for the generic slug handling for urls?

urls.py: http://dpaste.com/hold/47171/

Obviously the #&#039;d line is what I would use for a generic view, I was trying to recreate the same using a custom view.

Many thanks again,
Duncan</description>
		<content:encoded><![CDATA[<p>Yes I'm back again...</p>
<p>I've been trying to write a custom view to incorporate your pagination code in whilst using a wrapper to use the generic view slug handling.</p>
<p>This is my views.py: <a href="http://dpaste.com/hold/47175/" rel="nofollow">http://dpaste.com/hold/47175/</a></p>
<p>I've looked at many examples of how to create a wrapper, I just have no idea of how I could combine your custom pagination with a wrapper for the generic slug handling for urls?</p>
<p>urls.py: <a href="http://dpaste.com/hold/47171/" rel="nofollow">http://dpaste.com/hold/47171/</a></p>
<p>Obviously the #'d line is what I would use for a generic view, I was trying to recreate the same using a custom view.</p>
<p>Many thanks again,<br />
Duncan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-58</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 24 Apr 2008 02:11:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-58</guid>
		<description>That should just be matter of HTML code generation - just replace the {# pagelink page #} in the blog post example with whatever matches your CSS. Here&#039;s what I use in an application - probably not 100% digg style, but you can build on it:
 
&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;
 {% if paginator.is_paginated %}
    &lt;div class=&quot;pagination&quot;&gt;
        {% if paginator.has_previous %}&lt;a title=&quot;Previous Page&quot; href=&quot;?page={{paginator.previous}}&quot;&gt;&laquo;&lt;/a&gt;{% endif %}
        {% for page in paginator.page_range %}
            {% if not page %}
                ...
            {% else %}
                {% ifequal page paginator.page %}&lt;strong class=&quot;current&quot;&gt;{{ page }}&lt;/strong&gt;

                {% else %}&lt;a title=&quot;Page {{ page }}&quot; href=&quot;?page={{ page }}&quot; rel=&quot;nofollow&quot;&gt;{{ page }}&lt;/a&gt;{% endifequal %}
            {% endif %}
        {% endfor %}
        {% if paginator.has_next %}&lt;a title=&quot;Next Page&quot; href=&quot;?page={{paginator.next}}&quot; &gt;&raquo;&lt;/a&gt;{% endif %}
        &nbsp;Page {{ paginator.page }} of {{ paginator.pages }}
    &lt;/div&gt;
    {% endif %}
&lt;/pre&gt;

And the CSS:

&lt;pre name=&quot;code&quot; class=&quot;css&quot;&gt;
.pagination a, .pagination .current {
    padding: 2px 5px;
    border: 1px solid;
}

.pagination .current {
    background-color: white;
    color: black;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>That should just be matter of HTML code generation - just replace the {# pagelink page #} in the blog post example with whatever matches your CSS. Here's what I use in an application - probably not 100% digg style, but you can build on it:</p>
<pre name="code" class="html">
 {% if paginator.is_paginated %}
    &lt;div class=&quot;pagination&quot;&gt;
        {% if paginator.has_previous %}&lt;a title=&quot;Previous Page&quot; href=&quot;?page={{paginator.previous}}&quot;&gt;&amp;laquo;&lt;/a&gt;{% endif %}
        {% for page in paginator.page_range %}
            {% if not page %}
                ...
            {% else %}
                {% ifequal page paginator.page %}&lt;strong class=&quot;current&quot;&gt;{{ page }}&lt;/strong&gt;

                {% else %}&lt;a title=&quot;Page {{ page }}&quot; href=&quot;?page={{ page }}&quot; rel=&quot;nofollow&quot;&gt;{{ page }}&lt;/a&gt;{% endifequal %}
            {% endif %}
        {% endfor %}
        {% if paginator.has_next %}&lt;a title=&quot;Next Page&quot; href=&quot;?page={{paginator.next}}&quot; &gt;&amp;raquo;&lt;/a&gt;{% endif %}
        &amp;nbsp;Page {{ paginator.page }} of {{ paginator.pages }}
    &lt;/div&gt;
    {% endif %}
</pre>
<p>And the CSS:</p>
<pre name="code" class="css">
.pagination a, .pagination .current {
    padding: 2px 5px;
    border: 1px solid;
}

.pagination .current {
    background-color: white;
    color: black;
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/comment-page-1/#comment-57</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Thu, 24 Apr 2008 01:58:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.elsdoerfer.name/2008/03/06/yet-another-paginator-digg-style/#comment-57</guid>
		<description>Your my hero!

the LAST thing I PROMISE =)

This page:
http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/

Has a neat little section on &quot;how to get the links&quot; working in the template and stylised too to make them look like from Digg or wherever.  Any chance you could add a similar one that would work with your awesome paginator to really make this fool (read Duncan) proof.

:-)</description>
		<content:encoded><![CDATA[<p>Your my hero!</p>
<p>the LAST thing I PROMISE =)</p>
<p>This page:<br />
<a href="http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/" rel="nofollow">http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/</a></p>
<p>Has a neat little section on "how to get the links" working in the template and stylised too to make them look like from Digg or wherever.  Any chance you could add a similar one that would work with your awesome paginator to really make this fool (read Duncan) proof.</p>
<p> <img src='http://blog.elsdoerfer.name/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
