djangosnippets.org: Latest snippets tagged with 'object_list'https://djangosnippets.org/tags/object_list/2011-01-19T11:24:25.612601-06:00Extend generic view object_list to support paginate_by via cookies
2011-01-19T11:24:25.612601-06:00kersurkhttps://djangosnippets.org/snippets/2329/<p>You can use this view to have a possibility to use ?paginate_by=x on your generic lists.
</p>
<p>Example usage in urls.py:
</p>
<p><code>url('^list/', object_list_with_paginate_by,
{'queryset': Invoice.objects.all(), 'template_name': 'invoices/list.html', 'paginate_by': 10},
'invoices.list')</code>
</p>
<p>10 is the default objects count per page.
</p>
<p>For the first time parameter paginate_by is set in URL, we have to …</p>
Freely redistributablepass a list to object_list
2008-04-29T17:24:15.085678-05:00andrewhttps://djangosnippets.org/snippets/733/<p>A zen study.
</p>
Freely redistributable