Bartek pisze: > so... looks like everytime I need 20 Post items my database is hit by > query returning all records... I find it a big overhead, and my app > suffers from that... Today I'm still investigating this issue, and I've just tried to use Paginator object as described at http://docs.djangoproject.com/en/dev/topics/pagination/#topics-pagination with my Post model described ina my previous post. Funny thing is that it's OK - sql for any page is:
SELECT "galgather_post"."id", "galgather_post"."group_id", "galgather_post"."messageid", "galgather_post"."subject", "galgather_post"."author_id", "galgather_post"."posting_date", "galgather_post"."date_added" FROM "galgather_post" ORDER BY "galgather_post"."posting_date" DESC LIMIT 10 OFFSET 10 triggered by: posts=Post.objects.all() p=Paginator(posts,10) page2=p.page(2) page2.object_list So, any idea where's the clue? Is it possible to use django-pagination with generic views without so senseless overhead? -- Bartek --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---