joashivanmoodley / django-pagination

Automatically exported from code.google.com/p/django-pagination
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

autopagione additional paramer - paginated queryset context variable name #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Current use of autopaginate tag expects existing separate queryset
variable. But in my case I didn't have variable. I had a function. In
another words I should write following:

{% autopaginate object.image_set.all %}

But how to iterate over result?
So I added one more parameter to this tag and used it in another way:

{% autopaginate object.image_set.all as images %}

And than I can iterate over "images".

The patch is attached. I hope it will help to improve your app. Thanks.

Original issue reported on code.google.com by n.le...@gmail.com on 15 Sep 2008 at 9:11

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry for mistype in title. 
It must be "autopaginate additional parameter - paginated queryset context 
variable
name".

Original comment by n.le...@gmail.com on 15 Sep 2008 at 9:13

GoogleCodeExporter commented 8 years ago

Original comment by leidel on 19 Sep 2008 at 9:48

GoogleCodeExporter commented 8 years ago

Original comment by leidel on 19 Sep 2008 at 9:48

GoogleCodeExporter commented 8 years ago

Original comment by leidel on 19 Sep 2008 at 9:48

GoogleCodeExporter commented 8 years ago
I really like that idea, any objections Eric?

Original comment by leidel on 19 Sep 2008 at 9:49

GoogleCodeExporter commented 8 years ago
How is it going? I've started a patch for this issue and issue #4, based on the
current revision. I can publish it here, if you want!?

Original comment by mar...@mahner.org on 7 Oct 2008 at 10:03

GoogleCodeExporter commented 8 years ago
Bring it on martin..

Original comment by leidel on 19 Oct 2008 at 11:32

GoogleCodeExporter commented 8 years ago
I just added this capability in r42.  Thanks for the original idea, n.leush!

Original comment by flo...@gmail.com on 24 Oct 2008 at 8:47

GoogleCodeExporter commented 8 years ago
This example should be added to the Usage document. Was stuck on this until I 
found this issue.  Under step 5, 
I'd just add another use case, citing an example like the original one in this 
issue.

Original comment by joshua.w...@gmail.com on 28 Oct 2008 at 10:36