<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Django Aware - Latest Comments in Digg Style Pagination In Django Revisited</title><link>http://djangoaware.disqus.com/</link><description></description><atom:link href="https://djangoaware.disqus.com/digg_style_pagination_in_django_revisited/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 26 Sep 2009 09:30:25 -0000</lastBuildDate><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-17421024</link><description>&lt;p&gt;Ook, it's here:&lt;br&gt;&lt;a href="http://www.meowcode.com/django/digg-style-pagination-in-django-revisited-once-again/" rel="nofollow noopener" target="_blank" title="http://www.meowcode.com/django/digg-style-pagination-in-django-revisited-once-again/"&gt;http://www.meowcode.com/dja...&lt;/a&gt;&lt;br&gt;I tried to make it step-by-step, let me know how does it works for you in comments there.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MeowCode</dc:creator><pubDate>Sat, 26 Sep 2009 09:30:25 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-17381961</link><description>&lt;p&gt;Glad to hear you like it, I'll publish it in next few days and link back here..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MeowCode</dc:creator><pubDate>Fri, 25 Sep 2009 12:12:43 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-17338042</link><description>&lt;p&gt;gamejumble&lt;/p&gt;&lt;p&gt;Wow, I love the result.&lt;/p&gt;&lt;p&gt;I'd love to use this but can't figure out how to get it working. Could you post a complete example, eg view, url, template + any thing else necessary.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">john</dc:creator><pubDate>Thu, 24 Sep 2009 20:27:03 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-16983218</link><description>&lt;p&gt;You can see final result of pagination with alternative CSS here:&lt;br&gt;&lt;a href="http://www.gamejumble.com/category/action/" rel="nofollow noopener" target="_blank" title="http://www.gamejumble.com/category/action/"&gt;http://www.gamejumble.com/c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MeowCode</dc:creator><pubDate>Sun, 20 Sep 2009 09:39:59 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-16936309</link><description>&lt;p&gt;Thanks for sharing your work, here are fixes of the code:&lt;br&gt;1) Code as-is will not run with Apache/WSGI, because wsgi does not allow writing to stdout. To fix this, remove 'print' statements in code.&lt;br&gt;2) If you add:&lt;br&gt;view = template.resolve_variable(self.view, context)&lt;br&gt;to PaginationNode.render(), you will be able to pass 'current_url' as context-variable also, similary to page index&lt;br&gt;3. As meppum posted, using alternative template/css is very good idea&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MeowCode</dc:creator><pubDate>Sat, 19 Sep 2009 20:08:26 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-16530248</link><description>&lt;p&gt;Please post a sample &lt;a href="http://urls.py" rel="nofollow noopener" target="_blank" title="urls.py"&gt;urls.py&lt;/a&gt; and &lt;a href="http://views.py" rel="nofollow noopener" target="_blank" title="views.py"&gt;views.py&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">corsairmoran</dc:creator><pubDate>Sun, 13 Sep 2009 01:33:08 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-15424749</link><description>&lt;p&gt;Greate script&lt;/p&gt;&lt;p&gt;Thanks &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rollenc</dc:creator><pubDate>Wed, 26 Aug 2009 12:07:27 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-14871254</link><description>&lt;p&gt;I'd also like to see an example, surprising there isn't one in the first place.&lt;/p&gt;&lt;p&gt;"No messy URLs to configure" how do you pass the page no without configuring the url?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">john</dc:creator><pubDate>Sat, 15 Aug 2009 04:02:54 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-13180871</link><description>&lt;p&gt;Wow a bit harsh on the delivery but I'm not opposed to pointing users at something better.&lt;/p&gt;&lt;p&gt;I looked over the other code and it looks good.  Go for it... sorry my startup has taken time away from my ability to maintain this code, a year is a good run though.&lt;/p&gt;&lt;p&gt;PS: The frustrated user above doesn't sound like he/she even tried the code before passing judgment.  I hope I'm wrong.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pkenjora</dc:creator><pubDate>Wed, 22 Jul 2009 20:19:07 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-13135381</link><description>&lt;p&gt;For anyone wanting to do pagination and sorting I suggest using:&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;br&gt;and&lt;br&gt;&lt;a href="http://code.google.com/p/django-sorting/" rel="nofollow noopener" target="_blank" title="http://code.google.com/p/django-sorting/"&gt;http://code.google.com/p/dj...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;DO NOT WASTE YOUR TIME trying to understand this templatetag.&lt;br&gt;It might actually work well, but with practically no documentation and no complete examples you're bound to loose a lot of your valuable time.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">frustrateduser</dc:creator><pubDate>Wed, 22 Jul 2009 18:27:27 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-11951321</link><description>&lt;p&gt;Could you post an example of how you pass current_page to &lt;a href="http://views.py?" rel="nofollow noopener" target="_blank" title="views.py?"&gt;views.py?&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Thank you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">guest</dc:creator><pubDate>Tue, 30 Jun 2009 18:37:00 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-11035235</link><description>&lt;p&gt;The thing I like most with that kind of design is when you can just type in the page number and it takes you there. If you need to click 20 times to get from page 1 to page 70 it's just too much trouble and often not worth it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Olejek Rokitnikowy</dc:creator><pubDate>Wed, 17 Jun 2009 03:32:42 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-9503694</link><description>&lt;p&gt;I prefer this pagination over the alternatives.&lt;/p&gt;&lt;p&gt;I posted a modified version of the pagination.html that can be used with any of the css files from here: &lt;a href="http://mis-algoritmos.com/2007/03/16/some-styles-for-your-pagination/" rel="nofollow noopener" target="_blank" title="http://mis-algoritmos.com/2007/03/16/some-styles-for-your-pagination/"&gt;http://mis-algoritmos.com/2...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can find the modified version of pagination.html here: &lt;a href="http://meppum.com/media/blog_media/pagination.html" rel="nofollow noopener" target="_blank" title="http://meppum.com/media/blog_media/pagination.html"&gt;http://meppum.com/media/blo...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">meppum</dc:creator><pubDate>Mon, 18 May 2009 15:32:32 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-9061641</link><description>&lt;p&gt;Usually if you post the specific problem in the comments you'll get one of the awesome readers to drop by with an answer.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Red Wine</dc:creator><pubDate>Wed, 06 May 2009 12:49:29 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8849719</link><description>&lt;p&gt;While I accept that you are not obligated to do any of this for free, and that your code is very good, I can't help but feel like you're passing the buck when you tell me I should change my URLs. One of the main selling points of django is its extensibility, and I think it would be fitting for you to make changes to your script so that it can be used in a wider range of situations, rather than just the situations which suit you.&lt;/p&gt;&lt;p&gt;I have eliminated querystrings from my application where possible, but when it comes to searching I would actually prefer a query string.&lt;/p&gt;&lt;p&gt;You suggested changing my URL to:&lt;/p&gt;&lt;p&gt;{% paginate "site/search/bla/all/2days/" items current_page 50 10 paged_items %}&lt;/p&gt;&lt;p&gt;But how exactly is that going to work? How is "site/search/bla/all/2days/" going to insert the parameters specified by the user doing the search? ie..&lt;/p&gt;&lt;p&gt;site/pictures of cats and dogs/bla/videos-only/2weeks&lt;/p&gt;&lt;p&gt;............&lt;/p&gt;&lt;p&gt;There absolutely must be a simple way to modify your script to support any kind of url, and I guess I am forced to find it myself and modify your script. I shall post the results here when I get around to it.&lt;/p&gt;&lt;p&gt;All that aside, thanks for your effort. I'm in a better position with your code than I would be without it, so for that I am grateful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">UnhappyJoe</dc:creator><pubDate>Wed, 29 Apr 2009 23:01:09 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8814229</link><description>&lt;p&gt;Try changing your URL to the following:&lt;/p&gt;&lt;p&gt;{% paginate "site/search/bla/all/2days/" items current_page 50 10 paged_items %}&lt;/p&gt;&lt;p&gt;The current page you will still have to carry around in the context.  Pete's comment below is addressing this I think.&lt;/p&gt;&lt;p&gt;Not sure how much experience you've had passing parameters via URL but its a very powerful tool in Django.  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pkenjora</dc:creator><pubDate>Wed, 29 Apr 2009 12:09:42 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8809995</link><description>&lt;p&gt;Brilliant! Works a treat.&lt;/p&gt;&lt;p&gt;I'm trying to get the pagination widget to display in one template block and the page data to display in another template block.&lt;/p&gt;&lt;p&gt;Is there a way to share the "variable" of paged data across two blocks easily or do I need to create some sort of global in the paginaton tag and pass that across to the context of the other block?&lt;/p&gt;&lt;p&gt;Great work. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator><pubDate>Wed, 29 Apr 2009 10:18:58 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8751555</link><description>&lt;p&gt;I apologise for my previous comment... but you DO need some documentation he he. For somebody who has only recently picked up Django, your code made very little sense to me to begin with :)&lt;/p&gt;&lt;p&gt;I am trying to use your pagination code on a search page.. so I need this sort of thing -&lt;/p&gt;&lt;p&gt;site/search/?s=bla&amp;amp;show=all&amp;amp;threshold=2days&amp;amp;page=3&lt;/p&gt;&lt;p&gt;Is this possible using "a resolve context variable call" (don't know what that is) ?&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">UnhappyJoe</dc:creator><pubDate>Mon, 27 Apr 2009 20:03:12 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8729537</link><description>&lt;p&gt;Sorry to hear that, guess I can't please everyone all of the time.  You may want to double check the code, it supports dynamic URLs.&lt;/p&gt;&lt;p&gt;{% paginate "[dynamic URL here]" items current_page 50 10 paged_items %}&lt;/p&gt;&lt;p&gt;If you're asking for variable defined URLs then I suggest adding a resolve context variable call around the URL variable.  Next release i guess.... hopefully your head will feel better by then.&lt;/p&gt;&lt;p&gt;&amp;lt;img src="&lt;a href="http://i35.tinypic.com/2u78t3d.jpg" rel="nofollow noopener" target="_blank" title="http://i35.tinypic.com/2u78t3d.jpg"&gt;http://i35.tinypic.com/2u78...&lt;/a&gt;" border="0"&amp;gt;&lt;/p&gt;&lt;p&gt;PS: Note I didn't ask, "Why would you need dynamic pagination URLs..."&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pkenjora</dc:creator><pubDate>Mon, 27 Apr 2009 11:34:07 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8722763</link><description>&lt;p&gt;I gotta say, you fail at documentation.&lt;/p&gt;&lt;p&gt;After an hour or two of slamming my head into my desk, I finally realised that the idea of this is to have the paginator do all the paging for you [including the ORM calls]. Then I realised your /strict/url/s are not actually suitable for my paged search page and I'm going to have to modify it anyway.&lt;/p&gt;&lt;p&gt;Would have been so much easier for you to explain how it works, than it was for me to spend time discovering it's not what I'm looking for.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">UnhappyJoe</dc:creator><pubDate>Mon, 27 Apr 2009 06:05:35 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8255773</link><description>&lt;p&gt;If you want to use this script you need to remember to put a scrolldown list with all the pages too. I'm sick and tired of going for example from page 200 to 400 and having to reload the site like 50 times because it only moves 4 pages at the time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">miami web design</dc:creator><pubDate>Thu, 16 Apr 2009 05:28:59 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-8246431</link><description>&lt;p&gt;One of the main reasons to use urlpath/p/ over ?page=p is caching. The built in django cache only caches by the part of the url that comes before the parameters. So it would consider &lt;a href="http://www.foo.com/?page=1" rel="nofollow noopener" target="_blank" title="www.foo.com/?page=1"&gt;www.foo.com/?page=1&lt;/a&gt; the same as &lt;a href="http://www.foo.com/?page=2" rel="nofollow noopener" target="_blank" title="www.foo.com/?page=2"&gt;www.foo.com/?page=2&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">meppum</dc:creator><pubDate>Wed, 15 Apr 2009 20:45:55 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-7935357</link><description>&lt;p&gt;Paul,&lt;/p&gt;&lt;p&gt;Thanks for the update...&lt;/p&gt;&lt;p&gt;I found that by putting href="?page={{ page }}" in the pagination.html file instead of &lt;br&gt;href="/{{ pagination.view }}/{{ page }}/" you omit the need to include the url path as an argument... this is especially helpful if you are looking at, say, a list of Y's that are related to the Nth X object. This way the dynamic path (e.g. path/XN) can be omitted. It would otherwise have to be passed into the template by the view.&lt;/p&gt;&lt;p&gt;What were the reasons you chose to the convention urlpath/p/ over the convention ?page=p   ?&lt;/p&gt;&lt;p&gt;I'm a Django newbie ;p&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yehat</dc:creator><pubDate>Tue, 07 Apr 2009 08:37:49 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-7904885</link><description>&lt;p&gt;Yehat,&lt;/p&gt;&lt;p&gt;  I've updated the post with more details.  Hope it helps.  What were you having trouble with? Usually if you post the specific problem in the comments you'll get one of the awesome readers to drop by with an answer.&lt;/p&gt;&lt;p&gt;- Paul&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pkenjora</dc:creator><pubDate>Mon, 06 Apr 2009 10:49:16 -0000</pubDate></item><item><title>Re: Digg Style Pagination In Django Revisited</title><link>http://blog.awarelabs.com/?p=84#comment-7898487</link><description>&lt;p&gt;Paul,&lt;/p&gt;&lt;p&gt;If you want to help people, as I'm sure you do... more detailed documentation is required... especially for newbie Django peeps.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yehat</dc:creator><pubDate>Mon, 06 Apr 2009 08:33:29 -0000</pubDate></item></channel></rss>